<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>店铺详情</title>
    <script src="js/vue.js"></script>
    <script src="js/axios.min.js"></script>
    <script src="js/vue-router.js"></script>
    <script src="js/jquery-1.11.3.min.js"></script>

    <script src="js/layui/layui.js"></script>
    <link rel="stylesheet" href="js/layui/css/layui.css" />
    <link rel="stylesheet" href="css/styles.css">
    <link rel="stylesheet" href="css/main.css">
    <link rel="stylesheet" type="text/css" href="css/public.css">
    <link rel="shortcut icon" href="js/yinshi.png" type="image/x-icon" />
    <link rel="stylesheet" href="css/notiflix-1.3.0.min.css">
    <!-- 引入样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <!-- 引入组件库 -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>

    <style type="text/css">
        #NotiflixNotifyWrap{
		    position: fixed;
		    top: 50px !important;
            width: 200px !important;
            right: 30px !important;
	    }
    </style>
</head>
<body>
    <div id="app">
        <div class="shop-info">
            <div class="shoplst">
                <div class="addShopButton" @click="showAddShop = true">添加新店铺+</div>
                <div class="mtshoplst">
                    <h3 class="mtshoplst-title">
                        美团店铺 <span style="font-size: 14px;">  {{ mtShopNum }}个</span>
                        <div class="img-up" @click="mtflag = !mtflag">
                            <img src="js/up333.png" width="20px">
                        </div>
                    </h3>
                    <ul class="mtshops" v-if="mtflag">
                        <li v-for="(item,mtindex) in mtlst" :class="mtisactive == mtindex ? 'mtactive' : '' " @click="getlog(item.id,item.shoptype,mtindex,item.name)">{{ item.name }}
                            <span class="dynamictext" style="color:green;font-size: 10px;font-weight: 500;" v-if="item.isEnable == 1">正在推广</span>
                            <span class="dynamictext" style="color:#0d6aad;font-size: 10px;font-weight: 500;" v-if="item.guard == 1">监控</span>
                            <span class="dynamictext" style="color:#ffc300;font-size: 10px;font-weight: 500;" v-if="item.waitBidding == 1">等待推广</span>
                        </li>
                    </ul>
                </div>
                <div class="eleshoplst">
                    <h3 class="eleshoplst-title">
                        饿了么店铺 <span style="font-size: 14px;">  {{ eleShopNum }}个</span>
                        <div class="img-up" @click="eleflag = !eleflag">
                            <img src="js/upfff.png" width="20px">
                        </div>
                    </h3>
                    <ul class="eleshops" v-if="eleflag">
                        <li v-for="(item,index) in elelst" :class="isactive == index ? 'active':'' " @click="getlog(item.id,item.shoptype,index,item.name)">{{ item.name }}
                            <span class="dynamictext" style="color:green;font-size: 10px;font-weight: 500;" v-if="item.isEnable == 1">正在推广</span>
                            <span class="dynamictext" style="color:#0d6aad;font-size: 10px;font-weight: 500;" v-if="item.guard == 1">监控</span>
                            <span class="dynamictext" style="color:#ffc300;font-size: 10px;font-weight: 500;" v-if="item.waitBidding == 1">等待推广</span>
                        </li>
                    </ul>
                </div>
                <div class="line"></div>
            </div>
            <div class="load" v-if="loadflag">
                <div class="loader">
                    <svg version="1.1" id="loader-1"  x="0px" y="0px" width="100px" height="100px" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;" xml:space="preserve">
                        <path fill="#000" d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z">
                            <animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="0.6s" repeatCount="indefinite" />
                        </path>
                    </svg>
                    <div class="load-msg"> 加载中,请稍后....</div>
                </div>
            </div>
            <div class="infolst" >

                <!--导航栏-->
                <div class="navbar" id="top">
                    <div style="float: left;position: relative;width: 232px;margin-left: 15px; margin-right: 15px;">
                        <input type="text" style="border: 1px solid #ffc300; padding-left: 5px;"  placeholder="  输入店铺名称或id" class="searchbox" v-model="mtfind"/>
                        <input type="button" style="background-color: #ffc300;color: #333333; position: absolute; right: 0px;" value="搜美团" class="searchbtn" @click="findmt"/>
                    </div>
                    <div style="float: left;position: relative;width: 232px;">
                        <input type="text" style="border: 1px solid #008de1;padding-left: 5px;" placeholder="  输入店铺名称或id" class="searchbox" v-model="elefind"/>
                        <input type="button" style="background-color: #008de1;color: white; position: absolute; right: 0px;" value="搜饿了么" class="searchbtn" @click="findele"/>
                    </div>
                    <div style="float: left" class="options">
                        <span @click="setbidding">竞价推广</span>
                        <span @click="getOrder" style="margin-left: 10px;">获取订单</span>
                        <span style="margin-left: 10px;margin-right: 10px;" @click="getTuiDetail">推广详情</span>
                        <span @click="getplans" style="margin-right: 10px;">竞价计划</span>
                        <span @click="getShopStatus" style="margin-right: 10px;">店铺监测</span>
                        <span style="margin-right: 10px;" @click="setPreparedData">运营报告</span>
                        <span @click="exception">异常检查</span>
                    </div>
                    <div class="line"></div>
                </div>

                <!-- 添加新店铺模块 -->
                <div class="addShopModule" v-if="showAddShop">
                    <div>
                        <div style="height: 50px;text-align: center;padding-top: 20px;font-size: 18px;font-weight: 600;">添加新店铺</div>
                        <div class="row">
                            <div class="col2"><span>店铺名称:&nbsp;</span><input type="text" v-model="newShop.name"></div>
                            <div class="col2"><span>店铺账号:&nbsp;</span><input type="text" v-model="newShop.account"></div>
                        </div>

                        <div class="row">
                            <div class="col2" ><span>最高出价:&nbsp;</span><input type="text" v-model="newShop.maxPrice"></div>
                            <div class="col2"><span>最低出价:&nbsp;</span><input type="text" v-model="newShop.minPrice"></div>
                        </div>
                        <div class="row">
                            <div class="col2" ><span>推广预算: </span><input type="text" v-model="newShop.budget"></div>
                            <div class="col2"><span>预曝光量:&nbsp;</span><input type="text" v-model="newShop.targetExposure"></div>
                        </div>
                        <div class="row">
                            <div class="col2" ><span>管理员: &emsp;</span><input type="text"  v-model="newShop.manager"></div>
                        </div>
                        <div class="row">
                            <div class="col" ><span>竞价:&nbsp;</span>
                                <div class="cb-item_toggler">
                                    <input type="checkbox" id="cb-item_toggler-9" class="cb-item_input" checked="" v-model="newShop.isEnable">
                                    <label for="cb-item_toggler-9" class="cb-item_label">
                                        <span class="cb-item_marker"></span>
                                        <span class="cb-item_label-off" style="font-size: 14px;">关</span>
                                        <span class="cb-item_label-on" style="font-size: 14px;">开</span>
                                    </label>
                                </div>
                            </div>
                            <div class="col">
                                <span>绑定:&nbsp;</span>
                                <div class="cb-item_toggler">
                                    <input type="checkbox" id="cb-item_toggler-10" class="cb-item_input" checked="" v-model="newShop.isBind">
                                    <label for="cb-item_toggler-10" class="cb-item_label">
                                        <span class="cb-item_marker"></span>
                                        <span class="cb-item_label-off" style="font-size: 14px;">否</span>
                                        <span class="cb-item_label-on" style="font-size: 14px;">是</span>
                                    </label>
                                </div>
                            </div>
                            <div class="col">
                                <span>按预算推广:&nbsp;</span>
                                <div class="cb-item_toggler">
                                    <input type="checkbox" id="cb-item_toggler-11" class="cb-item_input" checked="" v-model="newShop.isByBudget">
                                    <label for="cb-item_toggler-11" class="cb-item_label">
                                        <span class="cb-item_marker"></span>
                                        <span class="cb-item_label-off" style="font-size: 14px;">否</span>
                                        <span class="cb-item_label-on" style="font-size: 14px;">是</span>
                                    </label>
                                </div>
                            </div>
                            <div class="col">
                                <span style="font-size: 14px;">店铺种类:&nbsp;</span>
                                <div style="float: right;padding-left: 30px;">
                                    <label for="mt" style="font-size: 14px;">美团</label>
                                    <input type="radio" value="1" label="mt" v-model="newShop.shopType">
                                </div>
                                <div style="float: right;">
                                    <label for="ele" style="font-size: 14px;">饿了么</label>
                                    <input type="radio" value="2" label="ele" v-model="newShop.shopType">
                                </div>
                            </div>
                        </div>
                        <div v-if="infoshow" style="font-size:14px;color:#0d6aad;text-align: center;">正在保存...</div>
                        <div class="row">
                            <input type="button" style="width: 300px;height: 35px;font-weight: 600; background-color: #00a65a;color: white;margin-left:160px;margin-top: 10px; border: 0 none;border-radius: 3px;" value="添加" @click="saveNewShop"/>
                        </div>
                    </div>
                </div>

                <!--放置组建的容器-->
                <div class="container">
                    <biddinglogcom  v-if = "comindex == 1" v-bind:parentloglst = "loglst" v-bind:parentnowid = "nowid" v-bind:parentloading = 'loading' v-bind:parentlognull = "lognull" v-bind:parentshopname = "shopname"></biddinglogcom>
                    <biddingplancom v-if="comindex == 2" v-bind:parentplanlst = "planlst" v-bind:parentplanlsttomorrow = "planlsttomorrow" v-bind:parenttype = "type" v-bind:parentshopname = "shopname"></biddingplancom>
                    <biddingsetcom v-if="comindex == 3" v-bind:parenttype = "type" v-bind:parentnowid = "nowid" v-bind:parentisopen="isopen"
                    v-bind:parentbiddingstatusbtn="biddingstatusbtn"  v-bind:parentshoptype = "shoptype"  v-bind:parentshopname = "shopname"></biddingsetcom>
                    <tuidetailcom v-if="comindex == 4" v-bind:parenttime = "time" v-bind:parentexposure_myshop="exposure_myshop"
                    v-bind:parentexposure_othertopshop = "exposure_othertopshop" v-bind:parentexposure_percent="exposure_percent"
                    v-bind:parentorderrate_myshop = "orderrate_myshop" v-bind:parentorderrate_othertopshop = "orderrate_othertopshop"
                    v-bind:parentorderrate_percent = "orderrate_percent" v-bind:parentvisitrate_othertopshop = "visitrate_othertopshop"
                    v-bind:parentvisitrate_myshop = "visitrate_myshop" v-bind:parentvisitrate_percent = "visitrate_percent" v-bind:parentshopname = "shopname"
                    v-bind:parentconclution1 = "conclution1" v-bind:parentconclution2 = "conclution2" v-bind:parentconclution3 = "conclution3"></tuidetailcom>
                    <getordercom v-if="comindex == 5" v-bind:parentshoptype = "shoptype"  v-bind:parentshopname = "shopname"  v-bind:parentnowid = "nowid"></getordercom>
                    <keep-alive>
                        <getShopStatusCom v-on:enter="enter" v-if="comindex == 6"></getShopStatusCom>
                    </keep-alive>
                    <datapreparedcom v-if="comindex == 7" v-bind:parentshoptype = "shoptype"  v-bind:parentshopname = "shopname"  v-bind:parentnowid = "nowid"></datapreparedcom>
                    <keep-alive>
                        <exceptioncom v-if="comindex == 8" v-bind:parentshoptype = "shoptype"  v-bind:parentshopname = "shopname"  v-bind:parentnowid = "nowid"></exceptioncom>
                    </keep-alive>
                </div>

                <!--返回顶部的按钮-->
                <ul class="right_nav" onclick="func1()">
                    <li id="topflag">
                        <div class="iconBox top">
                            <img src='js/rntop.png'>
                            <h4>回到顶部</h4>
                        </div>
                  </li>
                </ul>

            </div>
        </div>

    </div>
    <template id="biddinglogtemp">
        <div id="biddinglog">
            <div class="load" v-if="loadflag">
                <div class="loader2">
                    <svg version="1.1" id="loader-2"  x="0px" y="0px" width="100px" height="100px" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;" xml:space="preserve">
                        <path fill="#000" d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z">
                            <animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="0.6s" repeatCount="indefinite" />
                        </path>
                    </svg>
                    <div class="load-msg"> 加载中,请稍后....</div>
                </div>
            </div>
            <div class="logtop">
                <div class="shoplogtitle">{{ parentshopname }}的竞价日志</div>
                <div class="changeday" @click="changebefore">前一天</div>
                <div class="shoplogdate">{{ daytime }}</div>
                <div class="changeday" style="padding-left: 10px;" @click="changeafter">后一天</div>
                <div class="line"></div>
            </div>
            <div v-loading="parentloading">
                <ul class="logtitle">
                    <li style="width: calc(6% - 1px)">时间</li>
                    <li style="width: calc(6% - 1px)">目标</li>
                    <li style="width: calc(6% - 1px)">实际</li>
                    <li style="width: calc(6% - 1px)">p目标</li>
                    <li style="width: calc(6% - 1px)">p曝光</li>
                    <li style="width: calc(6% - 1px)">点金</li>
                    <li style="width: calc(9% - 1px)">订单/访问</li>
                    <li style="width: calc(7% - 1px)">预算</li>
                    <li style="width: calc(9% - 1px)">花费/预算</li>
                    <li style="width: calc(22% - 1px)">操作说明</li>
                    <li style="width: calc(10% - 1px)">异常说明</li>
                    <li style="width: calc(6% - 1px)">余额</li>
                </ul>
                <div v-if="parentlognull" v-if="parentlog" style="color: #333333;text-align: center; font-size: 14px;padding-top: 20px;">今天暂无竞价记录</div>
                <ul v-for="loginfo in parentloglst" class="logcontent" v-if="parentlog">
                    <li style="width: calc(6% - 1px)">{{ loginfo.biddingtime }}</li>
                    <li style="width: calc(6% - 1px)">{{ loginfo.targetnum }}</li>
                    <li style="width: calc(6% - 1px)">{{ loginfo.exposurenum }}</li>
                    <li style="width: calc(6% - 1px)">{{ loginfo.periodtarget }}</li>
                    <li style="width: calc(6% - 1px)">{{loginfo.periodexposure}}</li>l
                    <li style="width: calc(6% - 1px)">{{ loginfo.baseprice }}</li>
                    <li style="width: calc(9% - 1px)">{{ loginfo.realTimeOrder }}</li>
                    <li style="width: calc(7% - 1px)">{{ loginfo.budget }}</li>
                    <li style="width: calc(9% - 1px)">{{ loginfo.currentCost }}</li>
                    <li style="width: calc(22% - 1px)"><input type="text" style="height: 32px;border: 0 none; outline: none;width: 100%;text-align: center" v-model="loginfo.log" /></li>
                    <li style="width: calc(10% - 1px)"><input type="text" style="height: 32px;border: 0 none; outline: none;width: 100%;text-align: center" v-model="loginfo.exLog" /></li>
                    <li style="width: calc(6% - 1px)">{{ loginfo.blance }}</li>
                </ul>
                <div v-if="lognull" v-if="sonlog" style="color: #333333;text-align: center; font-size: 14px;padding-top: 20px;">该天暂无竞价记录</div>
                <ul v-for="loginfo in logscontent" class="logcontent" v-if="sonlog">
                    <li style="width: calc(6% - 1px)">{{ loginfo.biddingtime }}</li>
                    <li style="width: calc(6% - 1px)">{{ loginfo.targetnum }}</li>
                    <li style="width: calc(6% - 1px)">{{ loginfo.exposurenum }}</li>
                    <li style="width: calc(6% - 1px)">{{ loginfo.periodtarget }}</li>
                    <li style="width: calc(6% - 1px)">{{loginfo.periodexposure}}</li>
                    <li style="width: calc(6% - 1px)">{{ loginfo.baseprice }}</li>
                    <li style="width: calc(9% - 1px)">{{ loginfo.realTimeOrder }}</li>
                    <li style="width: calc(7% - 1px)">{{ loginfo.budget }}</li>
                    <li style="width: calc(9% - 1px)">{{ loginfo.currentCost }}</li>
                    <li style="width: calc(22% - 1px)"><input type="text" style="height: 32px;border: 0 none; outline: none;width: 100%;text-align: center" v-model="loginfo.log" /></li>
                    <li style="width: calc(10% - 1px)"><input type="text" style="height: 32px;border: 0 none; outline: none;width: 100%;text-align: center" v-model="loginfo.exLog" /></li>
                    <li style="width: calc(6% - 1px)">{{ loginfo.blance }}</li>
                </ul>
            </div>

        </div>
    </template>
    <template id="biddingplantemp">
        <div id="biddingplan">
            <div style="color: #333333;height: 40px;line-height: 40px" class="layui-row">
                <div style="font-size: 16px;font-weight: 600;text-align: right;" class="layui-col-md8">{{ parentshopname }}的竞价计划</div>
                <div class="clickText layui-col-md2" style="text-align: center;font-size: 12px;" @click="changeDayPlan(0)" id="today">今日计划</div>
                <div class="clickText layui-col-md2" style="text-align: left;font-size: 12px; " @click="changeDayPlan(1)" id="tomorrow">明日计划</div>
            </div>
            <ul class="plantitle">
                <li style="width: calc(20% - 1px)">id</li>
                <li style="width: calc(20% - 1px)">平台</li>
                <li style="width: calc(20% - 1px)">推广时间段</li>
                <li style="width: calc(20% - 1px)">计划</li>
                <li style="width: calc(20% - 1px)">预算</li>
            </ul>
            <ul v-for="plan in parentplanlst" class="plancontent"  v-if="today" >
                <li style="width: calc(20% - 1px)">{{ plan.id }}</li>
                <li style="width: calc(20% - 1px)">{{ parenttype }}</li>
                <li style="width: calc(20% - 1px)">{{plan.exposuretime}}</li>
                <li style="width: calc(20% - 1px)">{{ plan.exposurenum }}</li>
                <li style="width: calc(20% - 1px)">{{ plan.budget }}</li>
            </ul>
            <ul v-for="plan in parentplanlsttomorrow" class="plancontent" v-if="tomorrow">
                <li style="width: calc(20% - 1px)">{{ plan.id }}</li>
                <li style="width: calc(20% - 1px)">{{ parenttype }}</li>
                <li style="width: calc(20% - 1px)">{{plan.exposuretime}}</li>
                <li style="width: calc(20% - 1px)">{{ plan.exposurenum }}</li>
                <li style="width: calc(20% - 1px)">{{ plan.budget }}</li>
            </ul>

        </div>
    </template>
    <template id="biddinggetordertemp">
        <div id="order">
            <div style="color: #333333;font-size: 16px;font-weight: 600;text-align: center;padding-top: 20px;padding-bottom: 20px">为 {{ parentshopname }} 获取订单</div>
            <div class="orderContainer">
                <div class="orderTitle">
                    <p>订单分布</p>
                    <p v-for="t in dayTime">{{ t }}</p>
                </div>
                <ul class="timeul">
                    <li>00:00~00:30</li>
                    <li>00:30~01:00</li>
                    <li>01:00~01:30</li>
                    <li>01:30~02:00</li>
                    <li>02:00~02:30</li>
                    <li>02:30~03:00</li>
                    <li>03:00~03:30</li>
                    <li>03:30~04:00</li>
                    <li>04:00~04:30</li>
                    <li>04:30~05:00</li>
                    <li>05:00~05:30</li>
                    <li>05:30~06:00</li>
                    <li>06:00~06:30</li>
                    <li>06:30~07:00</li>
                    <li>07:00~07:30</li>
                    <li>07:30~08:00</li>
                    <li>08:00~08:30</li>
                    <li>08:30~09:00</li>
                    <li>09:00~09:30</li>
                    <li>09:30~10:00</li>
                    <li>10:00~10:30</li>
                    <li>10:30~11:00</li>
                    <li>11:00~11:30</li>
                    <li>11:30~12:00</li>
                    <li>12:00~12:30</li>
                    <li>12:30~13:00</li>
                    <li>13:00~13:30</li>
                    <li>13:30~14:00</li>
                    <li>14:00~14:30</li>
                    <li>14:30~15:00</li>
                    <li>15:00~15:30</li>
                    <li>15:30~16:00</li>
                    <li>16:00~16:30</li>
                    <li>16:30~17:00</li>
                    <li>17:00~17:30</li>
                    <li>17:30~18:00</li>
                    <li>18:00~18:30</li>
                    <li>18:30~19:00</li>
                    <li>19:00~19:30</li>
                    <li>19:30~20:00</li>
                    <li>20:00~20:30</li>
                    <li>20:30~21:00</li>
                    <li>21:00~21:30</li>
                    <li>21:30~22:00</li>
                    <li>22:00~22:30</li>
                    <li>22:30~23:00</li>
                    <li>23:00~23:30</li>
                    <li>23:30~24:00</li>
                </ul>
                <div class="ordernull" v-if="day1null">
                    无该日订单
                    <p @click="getCurrentOrder(1)" v-if="!isgetting1">马上获取</p>
                    <p style="color: green;text-align: center;font-size: 11px;" v-if="isgetting1">正在获取...</p>
                </div>
                <ul v-if="!day1null">
                    <li v-for="num in day1order">{{ num }}</li>
                </ul>
                <div class="ordernull" v-if="day2null">
                    无该日订单
                    <p @click="getCurrentOrder(2)" v-if="!isgetting2">马上获取</p>
                    <p style="color: green;text-align: center;font-size: 11px;" v-if="isgetting2">正在获取...</p>
                </div>
                <ul v-if="!day2null">
                    <li v-for="num in day2order">{{ num }}</li>
                </ul>
                <div class="ordernull" v-if="day3null">
                    无该日订单
                    <p @click="getCurrentOrder(3)" v-if="!isgetting3">马上获取</p>
                    <p style="color: green;text-align: center;font-size: 11px;" v-if="isgetting3">正在获取...</p>
                </div>
                <ul v-if="!day3null">
                    <li v-for="num in day3order">{{ num }}</li>
                </ul>
                <div class="ordernull" v-if="day4null">
                    无该日订单
                    <p @click="getCurrentOrder(4)" v-if="!isgetting4">马上获取</p>
                    <p style="color: green;text-align: center;font-size: 11px;" v-if="isgetting4">正在获取...</p>
                </div>
                <ul v-if="!day4null">
                    <li v-for="num in day4order">{{ num }}</li>
                </ul>
                <div class="ordernull" v-if="day5null">
                    无该日订单
                    <p @click="getCurrentOrder(5)" v-if="!isgetting5">马上获取</p>
                    <p style="color: green;text-align: center;font-size: 11px;" v-if="isgetting5">正在获取...</p>
                </div>
                <ul v-if="!day5null">
                    <li v-for="num in day5order">{{ num }}</li>
                </ul>
                <div class="ordernull" v-if="day6null">
                    无该日订单
                    <p @click="getCurrentOrder(6)" v-if="!isgetting6">马上获取</p>
                   <p style="color: green;text-align: center;font-size: 11px;" v-if="isgetting6">正在获取...</p>
                </div>
                <ul v-if="!day6null">
                    <li v-for="num in day6order">{{ num }}</li>
                </ul>
                <div class="ordernull" v-if="day7null">
                    无该日订单
                    <p @click="getCurrentOrder(7)" v-if="!isgetting7">马上获取</p>
                    <p style="color: green;text-align: center;font-size: 11px;" v-if="isgetting7">正在获取...</p>
                </div>
                <ul v-if="!day7null">
                    <li v-for="num in day7order">{{ num }}</li>
                </ul>
                <div class="line"></div>
            </div>
        </div>

    </template>
    <template id="biddingsettemp">
        <div id="biddingset" v-loading="loading">
            <div class="settitle">
                <div style="float: left;height: 50px;width: 60%; text-align:center; font-weight: 600;font-size: 18px">{{ parentshopname }}设置竞价计划</div>
                <div style="float: left;height: 50px;width: 33%;">
                    <input type="button" style="width: 100px;height: 35px;float: right; background-color: #00a65a;color: white;border: 0 none;border-radius: 3px;" :class="wait == 1 ? 'wait':'' " :value="wait == 1 ? '正在保存':'保存'" @click="save" />
                </div>
            </div>
            <div class="row">
                <div class="col"><span>门店名称:&nbsp;</span><input type="text" readonly="true" style="width: 210px;" v-model="biddingset.shopname"></div>
                <div class="col"><span>店铺账号:&nbsp;</span><input type="text" readonly="true" style="width: 206px;" v-model="biddingset.shopaccount"></div>
                <div class="col"><span>闲时曝光比： </span><input type="text" style="width: 186px;"  v-model="biddingset.idleExposureRate"></div>
            </div>
            <div class="row">
                <div class="col">
                    <span>明日曝光比:&nbsp;</span><input type="text"  style="width: 191px;" v-model="nextExposureRate"/>
                    <!--
                    <p style="float:left;">明日曝光比:&nbsp;</p>
                    <div style="border: 1px solid #999999;height: 31px;line-height: 30px; margin-top: 9px; float: left;width: 208px;">
                        <input type="text" id="input-max22" style="width: 86px; height:29px; outline: none;border: 0 none;" v-model="updExposureRate"/>
                        <label style="font-size: 11px;" class="clickText" for="input-max22" @click="createNewPlan()">重新生成计划</label>
                    </div>
                    -->
                </div>
                <div class="col"><span>总体曝光比:&nbsp;</span><input type="text" readonly="readonly" style="width: 191px;" v-model="todayExposureRate"/></div>
                <div class="col">
                    <p style="float:left;">计算曝光比:&nbsp;</p>
                    <div style="border: 1px solid #999999;height: 31px;line-height: 30px; margin-top: 9px; float: left;width: 208px;">
                        <input type="text" id="input-max22" style="width: 86px; height:29px; outline: none;border: 0 none;" v-model="allExposureRate"/>
                        <label style="font-size: 11px;" class="clickText" for="input-max22" @click="getNewExposureRate()">获取</label>
                        <label style="font-size: 11px;" class="clickText" for="input-max22" @click="createNewPlan()">生成</label>
                    </div>

                </div>
            </div>
            <div class="row">
                <div class="col">
                    <p style="float:left;">最高出价:&nbsp;</p>
                    <div style="border: 1px solid #999999;height: 31px;line-height: 30px; margin-top: 9px; float: left;width: 222px;">
                        <input type="text" id="input-max" style="width: 86px; height:29px; outline: none;border: 0 none;" v-model="biddingset.maxprice"/>
                        <label style="color: #666666;font-size: 11px;" for="input-max">*建议最高价:&nbsp;{{ advicemax }} &nbsp;</label>
                    </div>
                </div>

                <div class="col">
                    <p style="float:left;">估值曝光:&nbsp;</p>
                    <div style="border: 1px solid #999999;height: 31px;line-height: 30px; margin-top: 9px; float: left;width: 222px;">
                        <input type="text" id="input-max2" style="width: 86px; height:29px; outline: none;border: 0 none;" v-model="nearExposure"/>
                        <label style="color: #666666;font-size: 11px;" for="input-max2">*建议最低价:&nbsp;{{ advicemin }} &nbsp;</label>
                    </div>
                </div>
                <div class="col"><span>限制百分比：</span><input type="text" style="width: 189px;" v-model="controlRate"></div>
            </div>
            <div class="row">
                <div class="col">
                    <p style="float:left;">推广预算:&nbsp;</p>
                    <div style="border: 1px solid #999999;height: 31px;line-height: 30px; margin-top: 9px; float: left;width: 222px;">
                        <input type="text" id="input-max3" style="width: 86px; height:29px; outline: none;border: 0 none;" v-model="biddingset.budget"/>
                        <label style="color: #666666;font-size: 11px;" for="input-max3">*建议预算额:&nbsp;{{ advicebudget }} &nbsp;</label>
                    </div>
                </div>
                <div class="col">
                    <p style="float:left;">预曝光量:&nbsp;</p>
                    <div style="border: 1px solid #999999;height: 31px;line-height: 30px; margin-top: 9px; float: left;width: 222px;">
                        <input type="text" id="input-max4" style="width: 86px; height:29px; outline: none;border: 0 none;" v-model="biddingset.targetexposure"/>
                        <label style="color: #666666;font-size: 11px;" for="input-max4">*建议曝光数:&nbsp;{{ advicetarget }} &nbsp;</label>
                    </div>
                </div>
                <div class="col"><span>基数百分比：</span><input type="text" style="width: 189px;" v-model="baseRate"></div>
            </div>
            <div class="setDate" v-if="setDateFlag">
                <div style="text-align: center;margin-bottom: 14px; height: 36px;font-size: 14px; font-weight: 500;line-height: 36px;color:#333333">请选择日期</div>
                <div>
                    <input type="text" v-model="curbiddate" class="dateInput" readonly="true">
                    <div @click="openHistoryMode" class="dateBtn" >确定</div>
                    <div @click="cancelSetDate" class="cancelbtn">取消</div>
                </div>
            </div>
            <div class="row">
                <div class="col" style="width: 16%"><span>竞价:&nbsp;</span>
                    <div class="cb-item_toggler">
                        <input type="checkbox" id="cb-item_toggler-2" class="cb-item_input" checked="" v-model="biddingset.isenable">
                        <label for="cb-item_toggler-2" class="cb-item_label">
                            <span class="cb-item_marker"></span>
                            <span class="cb-item_label-off" style="font-size: 14px;">关</span>
                            <span class="cb-item_label-on" style="font-size: 14px;">开</span>
                        </label>
                    </div>
                </div>
                <div class="col" v-if="budgetflag">
                    <span>绑定:&nbsp;</span>
                    <div class="cb-item_toggler">
                        <input type="checkbox" id="cb-item_toggler-3" class="cb-item_input" checked="" v-model="biddingset.isbind">
                        <label for="cb-item_toggler-3" class="cb-item_label">
                            <span class="cb-item_marker"></span>
                            <span class="cb-item_label-off" style="font-size: 14px;">否</span>
                            <span class="cb-item_label-on" style="font-size: 14px;">是</span>
                        </label>
                    </div>
                </div>
                <div class="col" style="width: 16%">
                    <span>监控:&nbsp;</span>
                    <div class="cb-item_toggler">
                        <input type="checkbox" id="cb-item_toggler-90" class="cb-item_input" @click="openGuard" checked="" v-model="guard">
                        <label for="cb-item_toggler-90" class="cb-item_label">
                            <span class="cb-item_marker"></span>
                            <span class="cb-item_label-off" style="font-size: 14px;">关</span>
                            <span class="cb-item_label-on" style="font-size: 14px;">开</span>
                        </label>
                    </div>
                </div>
                <div class="col" style="width: 16%">
                    <span>锁定推广:&nbsp;</span>
                    <div class="cb-item_toggler">
                        <input type="checkbox" id="cb-item_toggler-204" class="cb-item_input" @click="lockAdTime" checked="" v-model="lock">
                        <label for="cb-item_toggler-204" class="cb-item_label">
                            <span class="cb-item_marker"></span>
                            <span class="cb-item_label-off" style="font-size: 14px;">否</span>
                            <span class="cb-item_label-on" style="font-size: 14px;">是</span>
                        </label>
                    </div>
                </div>
                <div class="col" style="width: 16%">
                    <span>定时定价:&nbsp;</span>
                    <div class="cb-item_toggler">
                        <input type="checkbox" id="cb-item_toggler-101" class="cb-item_input" @click="historyclick" checked="" v-model="historymode">
                        <label for="cb-item_toggler-101" class="cb-item_label">
                            <span class="cb-item_marker"></span>
                            <span class="cb-item_label-off" style="font-size: 14px;">关</span>
                            <span class="cb-item_label-on" style="font-size: 14px;">开</span>
                        </label>
                    </div>
                </div>
                <div class="col" v-if="budgetflag">
                    <span>低价运行:&nbsp;</span>
                    <div class="cb-item_toggler">
                        <input type="checkbox" id="cb-item_toggler-107" class="cb-item_input" @click="openlowpricemode" checked="" v-model="lowpricemode">
                        <label for="cb-item_toggler-107" class="cb-item_label">
                            <span class="cb-item_marker"></span>
                            <span class="cb-item_label-off" style="font-size: 14px;">关</span>
                            <span class="cb-item_label-on" style="font-size: 14px;">开</span>
                        </label>
                    </div>
                </div>
                <div class="col" v-if="budgetflag">
                    <span>按预算推广:&nbsp;</span>
                    <div class="cb-item_toggler">
                        <input type="checkbox" id="cb-item_toggler-4" class="cb-item_input" checked="" v-model="biddingset.isbybudget">
                        <label for="cb-item_toggler-4" class="cb-item_label">
                            <span class="cb-item_marker"></span>
                            <span class="cb-item_label-off" style="font-size: 14px;">否</span>
                            <span class="cb-item_label-on" style="font-size: 14px;">是</span>
                        </label>
                    </div>
                </div>
                <div class="col" style="width: 16%">
                    <span>锁定忙时:&nbsp;</span>
                    <div class="cb-item_toggler">
                        <input type="checkbox" id="cb-item_toggler-31" class="cb-item_input"  v-model="busyTimeLock">
                        <label for="cb-item_toggler-31" class="cb-item_label">
                            <span class="cb-item_marker"></span>
                            <span class="cb-item_label-off" style="font-size: 14px;">否</span>
                            <span class="cb-item_label-on" style="font-size: 14px;">是</span>
                        </label>
                    </div>
                </div>
                <div class="col" v-if="parentbiddingstatusbtn">
                    <span>平台开关:&nbsp;</span>
                    <div class="cb-item_toggler">
                        <input type="checkbox" id="cb-item_toggler-19" class="cb-item_input"  @click="changeAdStatus" checked="" v-model="biddingisopen">
                        <label for="cb-item_toggler-19" class="cb-item_label">
                            <span class="cb-item_marker"></span>
                            <span class="cb-item_label-off" style="font-size: 14px;">关</span>
                            <span class="cb-item_label-on" style="font-size: 14px;">开</span>
                        </label>
                    </div>
                </div>

                <div class="col" style="width: 16%">
                    <label for="cb-item_toggler-42">参数:&nbsp;</label>
                    <div class="cb-item_toggler">
                        <input type="checkbox" id="cb-item_toggler-47" @click="getNewPara" class="cb-item_input" checked="" v-model="havenGot">
                        <label for="cb-item_toggler-47" class="cb-item_label" style="width: 68px;">
                            <span class="cb-item_marker"></span>
                            <span class="cb-item_label-off" style="font-size: 14px;">未获取</span>
                            <span class="cb-item_label-on" style="font-size: 14px;">已获取</span>
                        </label>
                    </div>
                </div>
            </div>
            <div style="margin-top: 20px;">
                <div style="float: left;width:50%;">
                    <div style="color: #0d6aad;font-size: 14px;margin-bottom: 10px;cursor: pointer;">修改平台预算</div>
                    <div style="color: #666666;font-size: 10px;margin-bottom: 10px;">*平台当前预算{{ currentbudget }}</div>
                    <div style="color: #333333;font-size: 14px;margin-bottom: 10px;">
                        <label for="budgetinput">将平台预算修改为: </label>
                        <input id="budgetinput" style="width: 50px;height:20px; text-align: center" type="text" v-model="newbudget" />
                        <input type="button" value="确定" @click="setbudget" style="border-radius: 3px;font-weight: 400; background-color: #00a65a;color: white;border: 0 none;line-height: 24px;outline: none;  height: 24px;width: 50px;"/>
                    </div>
                </div>
                <div style="float: left;width:50%;">
                    <div style="color: #0d6aad;font-size: 14px;margin-bottom: 10px;cursor: pointer;">添加服务天数+</div>
                    <div style="color: #666666;font-size: 10px;margin-bottom: 10px;">*明天0点后即生效</div>
                    <div style="color: #333333;font-size: 14px;margin-bottom: 10px;">
                        <label for="serviceday">推广天数: </label>
                        <input id="serviceday" style="width: 50px;height:20px;text-align: center" type="text" v-model="servicetime" @keyup="getService"/> 天
                        <label for="serviceday" style="color: #666666;font-size: 10px;">推广周期: {{servicestart}} 00:00:00 至 {{serviceend}} 23:59:59</label>
                    </div>
                </div>
                <div class="line"></div>
            </div>
            <div style="margin-top: 20px;">
                <div style="float: left;width:50%">
                    <div style="color: #0d6aad;font-size: 14px;margin-bottom: 10px;cursor: pointer;" >
                        <span class="addNewBidPara" @click="timeindex += 1">新增竞价时段+</span>
                    </div>
                    <div v-if="timeindex>=1"  style="color: #333333;font-size: 14px;margin-bottom: 10px;">
                        <select style="height: 30px;width: 50px;" v-model="s1h1">
                            <option v-for="hour in hours" :value="hour" >{{ hour }}</option>
                        </select>

                        <select style="height: 30px;width: 50px;" v-model="s1m1">
                            <option v-for="min in mins" :value="min">{{ min }}</option>
                        </select>
                        <span>-</span>
                        <select style="height: 30px;width: 50px;" v-model="s1h2">
                            <option v-for="hour in hours" :value="hour" >{{ hour }}</option>
                        </select>

                        <select style="height: 30px;width: 50px;" v-model="s1m2">
                            <option v-for="min in mins" :value="min">{{ min }}</option>
                        </select>

                        <input type="text" style="height: 26px;width: 50px;" v-model="s1p">
                        <input type="button" value="x"  class="deletebtn" @click="timeindex -= 1">
                    </div>
                    <div v-if="timeindex>=2"  style="color: #333333;font-size: 14px;margin-bottom: 10px;">
                        <select style="height: 30px;width: 50px;" v-model="s2h1">
                            <option v-for="hour in hours" :value="hour" >{{ hour }}</option>
                        </select>

                        <select style="height: 30px;width: 50px;" v-model="s2m1">
                            <option v-for="min in mins" :value="min">{{ min }}</option>
                        </select>
                        <span>-</span>
                        <select style="height: 30px;width: 50px;" v-model="s2h2">
                            <option v-for="hour in hours" :value="hour" >{{ hour }}</option>
                        </select>

                        <select style="height: 30px;width: 50px;" v-model="s2m2">
                            <option v-for="min in mins" :value="min">{{ min }}</option>
                        </select>

                        <input type="text" style="height: 26px;width: 50px;" v-model="s2p">
                        <input type="button" value="x"  class="deletebtn" @click="timeindex -= 1" >
                    </div>
                    <div v-if="timeindex>=3"  style="color: #333333;font-size: 14px;margin-bottom: 10px;">
                        <select style="height: 30px;width: 50px;" v-model="s3h1">
                            <option v-for="hour in hours" :value="hour" >{{ hour }}</option>
                        </select>

                        <select style="height: 30px;width: 50px;" v-model="s3m1">
                            <option v-for="min in mins" :value="min">{{ min }}</option>
                        </select>
                        <span>-</span>
                        <select style="height: 30px;width: 50px;" v-model="s3h2">
                            <option v-for="hour in hours" :value="hour" >{{ hour }}</option>
                        </select>

                        <select style="height: 30px;width: 50px;" v-model="s3m2">
                            <option v-for="min in mins" :value="min">{{ min }}</option>
                        </select>

                        <input type="text" style="height: 26px;width: 50px;" v-model="s3p">
                        <input type="button" value="x"  class="deletebtn" @click="timeindex -= 1">
                    </div>
                    <div v-if="timeindex>=4"  style="color: #333333;font-size: 14px;margin-bottom: 10px;">
                        <select style="height: 30px;width: 50px;" v-model="s4h1">
                            <option v-for="hour in hours" :value="hour" >{{ hour }}</option>
                        </select>

                        <select style="height: 30px;width: 50px;" v-model="s4m1">
                            <option v-for="min in mins" :value="min">{{ min }}</option>
                        </select>
                        <span>-</span>
                        <select style="height: 30px;width: 50px;" v-model="s4h2">
                            <option v-for="hour in hours" :value="hour" >{{ hour }}</option>
                        </select>

                        <select style="height: 30px;width: 50px;" v-model="s4m2">
                            <option v-for="min in mins" :value="min">{{ min }}</option>
                        </select>

                        <input type="text" style="height: 26px;width: 50px;" v-model="s4p">
                        <input type="button" value="x"  class="deletebtn" @click="timeindex -= 1">
                    </div>
                </div>
                <div style="float: left;width:50%">
                    <div style="color: #0d6aad;font-size: 14px;margin-bottom: 10px;cursor: pointer;">竞价时段及参数设置</div>
                    <div style="font-size: 14px;color: #666666;">
                        <label for="rateinput">请输入百分比:</label>
                        <input type="input" id="rateinput" style="width: 50px;height: 24px;text-align: center" v-model="rateinput"/>
                        <label for="rateinput">%</label>
                        <input type="button" value="确定" @click="querytime" style="border-radius: 3px;font-weight: 400; background-color: #00a65a;color: white;border: 0 none;line-height: 24px;outline: none;  height: 24px;width: 50px;"/>
                    </div>
                </div>
                <div class="line"></div>
            </div>
            <div style="margin-bottom: 30px;">
                <div class="busytime"  style="font-size: 14px;float: left; color: #666666;width: 50%;">
                    <div style="height: 24px;">
                        <div style="color: #666666;float: left; margin-bottom: 5px;">闲时时段分布及 &nbsp;<p style="float: right;cursor:pointer; text-decoration: underline;color:rgb(13, 106, 173); " @click="acquireIdleMaxPrice">获取闲时最高价</p></div>

                    </div>

                    <ul class="busytime_ul">
                        <li v-for="(item,index) in idlelist">
                            <p>{{ item.s }}</p><p>-</p><p>{{ item.e }}</p>  <p style="width:72px;">最高价:<input type="text" style="border: 0 none;outline: none;width:24px; height: 24px;" v-model="idleMaxPriceList[index]"/></p>  <p style="width: 90px">转化率:{{ idleOrderRateList[index] }}</p>
                        </li>
                    </ul>
                    <div style="height: 32px;">
                        <div style="line-height: 30px;text-align: center; width: 60px;float: left;height: 30px;font-size: 14px;color:#666666;border-top: 1px solid #d4d4d4;border-right:1px solid #d4d4d4;border-bottom:1px solid #d4d4d4;border-left:1px solid #d4d4d4;">高价倍数</div>
                        <div style="line-height: 30px;text-align: center;width: 60px;float: left;height: 30px;font-size: 14px;color:#666666;border-top: 1px solid #d4d4d4;border-right:1px solid #d4d4d4;border-bottom:1px solid #d4d4d4;">低价倍数</div>
                        <div style="line-height: 30px;text-align: center;width: 80px;float: left;height: 30px;font-size: 14px;color:#666666;border-top: 1px solid #d4d4d4;border-right:1px solid #d4d4d4;border-bottom:1px solid #d4d4d4;">最高价倍数</div>
                        <div style="line-height: 30px;text-align: center;width: 60px;float: left;height: 30px;font-size: 14px;color:#666666;border-top: 1px solid #d4d4d4;border-right:1px solid #d4d4d4;border-bottom:1px solid #d4d4d4;">最低价</div>
                        <div style="line-height: 30px;text-align: center;width: 60px;float: left;height: 30px;font-size: 14px;color:#666666;border-top: 1px solid #d4d4d4;border-right:1px solid #d4d4d4;border-bottom:1px solid #d4d4d4;">中间价</div>
                        <div style="line-height: 30px;text-align: center;width: 60px;float: left;height: 30px;font-size: 14px;color:#666666;border-top: 1px solid #d4d4d4;border-right:1px solid #d4d4d4;border-bottom:1px solid #d4d4d4;">最高价</div>
                        <div style="line-height: 30px;text-align: center;width: 60px;float: left;height: 30px;font-size: 14px;color:#666666;border-top: 1px solid #d4d4d4;border-right:1px solid #d4d4d4;border-bottom:1px solid #d4d4d4;">峰值价</div>
                    </div>
                    <ul class="busytime_para">
                        <li style="width: 60px;border-left: 1px solid #d4d4d4;"><input type="text" style="height: 30px;width: 60px; border: 0 none;text-align: center;" v-model="idlep1"></li>
                        <li style="width: 60px;"><input type="text" style="height: 31px;width: 60px; border: 0 none;text-align: center; " v-model="idlep2"></li>
                        <li style="width: 80px;"><input type="text" style="height: 31px;width: 80px; border: 0 none;text-align: center;" v-model="idlep3"></li>
                        <li style="width: 60px;"><input type="text" style="height: 30px;width: 60px; border: 0 none;text-align: center;" v-model="idlep6"></li>
                        <li style="width: 60px;"><input type="text" style="height: 30px;width: 60px; border: 0 none;text-align: center;" v-model="idlep6"></li>
                        <li style="width: 60px;"><input type="text" style="height: 30px;width: 60px; border: 0 none;text-align: center;" v-model="idlep7"></li>
                        <li style="width: 60px;"><input type="text" style="height: 30px;width: 60px; border: 0 none;text-align: center;" v-model="idlep7"></li>
                    </ul>
                </div>
                <div class="busytime"  style="font-size: 14px;float: left; color: #666666;width: 50%;">
                    <div style="color: #666666;margin-bottom: 5px;">忙时时段分布及设置参数 &nbsp;&nbsp; 转化率:{{busyOrderRate}} 七天平均:{{ daysAvgPrice }}</div>
                    <ul class="busytime_ul">
                        <li v-for="item in busylist">
                            <p>{{ item.s }}</p><p>-</p><p>{{ item.e }}</p>
                        </li>

                    </ul>
                    <div style="height: 32px;">
                        <div style="line-height: 30px;text-align: center; width: 60px;float: left;height: 30px;font-size: 14px;color:#666666;border-top: 1px solid #d4d4d4;border-right:1px solid #d4d4d4;border-bottom:1px solid #d4d4d4;border-left:1px solid #d4d4d4;">高价倍数</div>
                        <div style="line-height: 30px;text-align: center;width: 60px;float: left;height: 30px;font-size: 14px;color:#666666;border-top: 1px solid #d4d4d4;border-right:1px solid #d4d4d4;border-bottom:1px solid #d4d4d4;">低价倍数</div>
                        <div style="line-height: 30px;text-align: center;width: 80px;float: left;height: 30px;font-size: 14px;color:#666666;border-top: 1px solid #d4d4d4;border-right:1px solid #d4d4d4;border-bottom:1px solid #d4d4d4;">最高价倍数</div>
                        <div style="line-height: 30px;text-align: center;width: 60px;float: left;height: 30px;font-size: 14px;color:#666666;border-top: 1px solid #d4d4d4;border-right:1px solid #d4d4d4;border-bottom:1px solid #d4d4d4;">最低价</div>
                        <div style="line-height: 30px;text-align: center;width: 60px;float: left;height: 30px;font-size: 14px;color:#666666;border-top: 1px solid #d4d4d4;border-right:1px solid #d4d4d4;border-bottom:1px solid #d4d4d4;">中间价</div>
                        <div style="line-height: 30px;text-align: center;width: 60px;float: left;height: 30px;font-size: 14px;color:#666666;border-top: 1px solid #d4d4d4;border-right:1px solid #d4d4d4;border-bottom:1px solid #d4d4d4;">最高价</div>
                        <div style="line-height: 30px;text-align: center;width: 60px;float: left;height: 30px;font-size: 14px;color:#666666;border-top: 1px solid #d4d4d4;border-right:1px solid #d4d4d4;border-bottom:1px solid #d4d4d4;">峰值价</div>
                    </div>
                    <ul class="busytime_para">
                        <li style="width: 60px;border-left: 1px solid #d4d4d4;"><input type="text" style="height: 30px;width: 60px; border: 0 none;text-align: center;" v-model="busyp1"></li>
                        <li style="width: 60px;"><input type="text" style="height: 31px;width: 60px; border: 0 none;text-align: center;" v-model="busyp2"></li>
                        <li style="width: 80px;"><input type="text" style="height: 31px;width: 80px; border: 0 none;text-align: center;" v-model="busyp3"></li>
                        <li style="width: 60px;"><input type="text" style="height: 30px;width: 60px; border: 0 none;text-align: center;" v-model="busyp6"></li>
                        <li style="width: 60px;"><input type="text" style="height: 30px;width: 60px; border: 0 none;text-align: center;" v-model="busyp6"></li>
                        <li style="width: 60px;"><input type="text" style="height: 30px;width: 60px; border: 0 none;text-align: center;" v-model="busyp7"></li>
                        <li style="width: 60px;"><input type="text" style="height: 30px;width: 60px; border: 0 none;text-align: center;" v-model="busyp7"></li>
                    </ul>
                </div>
                <div class="line"></div>
            </div>
            <div class="orderlist">
                <div style="height: 30px;">
                    <div style="color: #0d6aad;font-size: 14px;float: left;padding-bottom: 10px;">24小时订单量&nbsp;</div>
                    <div style="float: left;color: #333333;font-size: 14px;padding-left: 170px;">保持数据一致 <input type="checkbox" v-model="keepsame"  @click="setsame"></div>
                    <div class="line"></div>
                </div>
                <div class="order48">
                    <ul class="order48id">
                        <li>00:30</li>
                        <li>01:00</li>
                        <li>01:30</li>
                        <li>02:00</li>
                        <li>02:30</li>
                        <li>03:00</li>
                        <li>03:30</li>
                        <li>04:00</li>
                        <li>04:30</li>
                        <li>05:00</li>
                        <li>05:30</li>
                        <li>06:00</li>
                        <li>06:30</li>
                        <li>07:00</li>
                        <li>07:30</li>
                        <li>08:00</li>
                    </ul>
                    <ul class="order48id">
                        <li v-for="num in row1orderlist">{{ num }}</li>
                    </ul>
                    <ul class="order48id">
                        <li><input type="text" v-model="rate.r1"></li>
                        <li><input type="text" v-model="rate.r2"></li>
                        <li><input type="text" v-model="rate.r3"></li>
                        <li><input type="text" v-model="rate.r4"></li>
                        <li><input type="text" v-model="rate.r5"></li>
                        <li><input type="text" v-model="rate.r6"></li>
                        <li><input type="text" v-model="rate.r7"></li>
                        <li><input type="text" v-model="rate.r8"></li>
                        <li><input type="text" v-model="rate.r9"></li>
                        <li><input type="text" v-model="rate.r10"></li>
                        <li><input type="text" v-model="rate.r11"></li>
                        <li><input type="text" v-model="rate.r12"></li>
                        <li><input type="text" v-model="rate.r13"></li>
                        <li><input type="text" v-model="rate.r14"></li>
                        <li><input type="text" v-model="rate.r15"></li>
                        <li><input type="text" v-model="rate.r16"></li>
                    </ul>
                    <ul class="order48id" v-if="showCurbid">
                        <li v-for="(num,index) in curbid1"><input type="text" v-model="curbid1[index]"/></li>
                    </ul>
                </div>
                <div class="order48">
                    <ul class="order48id">

                        <li>08:30</li>
                        <li>09:00</li>
                        <li>09:30</li>
                        <li>10:00</li>
                        <li>10:30</li>
                        <li>11:00</li>
                        <li>11:30</li>
                        <li>12:00</li>
                        <li>12:30</li>
                        <li>13:00</li>
                        <li>13:30</li>
                        <li>14:00</li>
                        <li>14:30</li>
                        <li>15:00</li>
                        <li>15:30</li>
                        <li>16:00</li>


                    </ul>
                    <ul class="order48id">
                        <li v-for="num in row2orderlist">{{ num }}</li>
                    </ul>
                    <ul class="order48id">
                        <li><input type="text" v-model="rate.r17"></li>
                        <li><input type="text" v-model="rate.r18"></li>
                        <li><input type="text" v-model="rate.r19"></li>
                        <li><input type="text" v-model="rate.r20"></li>
                        <li><input type="text" v-model="rate.r21"></li>
                        <li><input type="text" v-model="rate.r22"></li>
                        <li><input type="text" v-model="rate.r23"></li>
                        <li><input type="text" v-model="rate.r24"></li>
                        <li><input type="text" v-model="rate.r25"></li>
                        <li><input type="text" v-model="rate.r26"></li>
                        <li><input type="text" v-model="rate.r27"></li>
                        <li><input type="text" v-model="rate.r28"></li>
                        <li><input type="text" v-model="rate.r29"></li>
                        <li><input type="text" v-model="rate.r30"></li>
                        <li><input type="text" v-model="rate.r31"></li>
                        <li><input type="text" v-model="rate.r32"></li>


                    </ul>
                    <ul class="order48id" v-if="showCurbid">
                        <li v-for="(num,index) in curbid2"><input type="text" v-model="curbid2[index]"/></li>
                    </ul>
                </div>
                <div class="order48">
                    <ul class="order48id">
                        <li>16:30</li>
                        <li>17:00</li>
                        <li>17:30</li>
                        <li>18:00</li>
                        <li>18:30</li>
                        <li>19:00</li>
                        <li>19:30</li>
                        <li>20:00</li>
                        <li>20:30</li>
                        <li>21:00</li>
                        <li>21:30</li>
                        <li>22:00</li>
                        <li>22:30</li>
                        <li>23:00</li>
                        <li>23:30</li>
                        <li>24:00</li>
                    </ul>
                    <ul class="order48id">
                        <li v-for="num in row3orderlist">{{ num }}</li>
                    </ul>
                    <ul class="order48id">
                        <li><input type="text" v-model="rate.r33"></li>
                        <li><input type="text" v-model="rate.r34"></li>
                        <li><input type="text" v-model="rate.r35"></li>
                        <li><input type="text" v-model="rate.r36"></li>
                        <li><input type="text" v-model="rate.r37"></li>
                        <li><input type="text" v-model="rate.r38"></li>
                        <li><input type="text" v-model="rate.r39"></li>
                        <li><input type="text" v-model="rate.r40"></li>
                        <li><input type="text" v-model="rate.r41"></li>
                        <li><input type="text" v-model="rate.r42"></li>
                        <li><input type="text" v-model="rate.r43"></li>
                        <li><input type="text" v-model="rate.r44"></li>
                        <li><input type="text" v-model="rate.r45"></li>
                        <li><input type="text" v-model="rate.r46"></li>
                        <li><input type="text" v-model="rate.r47"></li>
                        <li><input type="text" v-model="rate.r48"></li>
                    </ul>
                    <ul class="order48id" v-if="showCurbid">
                        <li v-for="(num,index) in curbid3"><input type="text" v-model="curbid3[index]"/></li>
                    </ul>
                </div>
                <div class="line"></div>
            </div>
        </div>
    </template>
    <template id="tuidetailtemp">
        <div id="result" style="margin-top: 10px;margin-left: 10%">
            <div style="color: #333333;font-size: 16px;font-weight: 600;text-align: center;padding-top: 10px;padding-bottom: 10px">{{ parentshopname }} 的推广详情</div>
            <div class="form-row-0">
                <div style="float: left;width: 14%;height: 30px;border-right: 1px solid #999999;"></div>
                <div style="float: left;width: 14%;height: 30px;border-right: 1px solid #999999;">
                </div>
                <div style="float: left;width: 70%;">
                    <ul class="form-header">
                        <li style="width: 14%" v-for="t in parenttime">{{ t }}</li>

                    </ul>
                </div>
                <div class="line"></div>
            </div>
            <div class="form-row-1">
                <div style="float: left;width: 14%;height: 90px;line-height: 90px; text-align: center;border-right: 1px solid #999999;">曝光量</div>
                <div style="float: left;width: 14%;border-right: 1px solid #999999;">
                    <div style="height: 30px;line-height: 30px;text-align: center;">本店</div>
                    <div style="height: 30px;line-height: 30px;text-align: center;border-top: 1px solid #999999;border-bottom: 1px solid #999999;">商圈同行前10%</div>
                    <div style="height: 30px;line-height: 30px;text-align: center;">百分比</div>
                </div>
                <div style="float: left;width: 70%;">
                    <ul class="exposurenumul">
                        <li style="width: 14%" v-for="e in parentexposure_myshop">{{ e }}</li>

                    </ul>
                    <ul class="exposurenumul">
                        <li style="width: 14%" v-for="e in parentexposure_othertopshop">{{ e }}</li>

                    </ul>
                    <ul class="exposurenumul">
                        <li style="width: 14%" v-for="e in parentexposure_percent">{{ e }}</li>

                    </ul>
                </div>
                <div class="line"></div>
            </div>
            <div class="form-row-1">
                <div style="float: left;width: 14%;height: 90px;line-height: 90px;text-align: center;border-right: 1px solid #999999;">入店转化率</div>
                <div style="float: left;width: 14%;border-right: 1px solid #999999;">
                    <div style="height: 30px;line-height: 30px;text-align: center;">本店</div>
                    <div style="height: 30px;line-height: 30px;text-align: center;border-top: 1px solid #999999;border-bottom: 1px solid #999999;">商圈同行前10%</div>
                    <div style="height: 30px;line-height: 30px;text-align: center;">百分比</div>
                </div>
                <div style="float: left;width: 70%;">
                    <ul class="exposurenumul">
                        <li style="width: 14%" v-for="e in parentvisitrate_myshop">{{ e }}</li>


                    </ul>
                    <ul class="exposurenumul">
                        <li style="width: 14%" v-for="e in parentvisitrate_othertopshop">{{ e }}</li>

                    </ul>
                    <ul class="exposurenumul">
                        <li style="width: 14%" v-for="e in parentvisitrate_percent">{{ e }}</li>

                    </ul>
                </div>
                <div class="line"></div>
            </div>
            <div class="form-row-1">
                <div style="float: left;width: 14%;height: 90px;line-height: 90px;text-align: center;border-right: 1px solid #999999;">下单转化率</div>
                <div style="float: left;width: 14%;border-right: 1px solid #999999;">
                    <div style="height: 30px;line-height: 30px;text-align: center;">本店</div>
                    <div style="height: 30px;line-height: 30px;text-align: center;border-top: 1px solid #999999;border-bottom: 1px solid #999999;">商圈同行前10%</div>
                    <div style="height: 30px;line-height: 30px;text-align: center;">百分比</div>
                </div>
                <div style="float: left;width: 70%;">
                    <ul class="exposurenumul">
                        <li style="width: 14%" v-for="e in parentorderrate_myshop">{{ e }}</li>

                    </ul>
                    <ul class="exposurenumul">
                        <li style="width: 14%" v-for="e in parentorderrate_othertopshop">{{ e }}</li>

                    </ul>
                    <ul class="exposurenumul">
                        <li style="width: 14%" v-for="e in parentorderrate_percent">{{ e }}</li>

                    </ul>

                </div>
                <div class="line"></div>
            </div>
            <div class="conclusion">
                <div style="height: 30px;border-bottom: 1px solid #d4d4d4;line-height: 30px;padding-left: 10px;">结论1：{{ parentconclution1 }}</div>
                <div style="height: 30px;border-bottom: 1px solid #d4d4d4;line-height: 30px;padding-left: 10px;">结论2：{{ parentconclution2 }}</div>
                <div style="height: 30px;border-bottom: 1px solid #d4d4d4;line-height: 30px;padding-left: 10px;">结论3：{{ parentconclution3 }}</div>
            </div>
        </div>
    </template>
    <template id="getshopstatustemp">
        <div class="status_com">
            <div class="load" v-if="loadflag2">
                <div class="loader2" title="2">
                    <svg version="1.1" id="loader-2"  x="0px" y="0px" width="100px" height="100px" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;" xml:space="preserve">
                        <path fill="#000" d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z">
                            <animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="0.6s" repeatCount="indefinite" />
                        </path>
                    </svg>
                    <div class="load-msg"> 加载中,请稍后....</div>
                </div>
            </div>
            <div class="typeclick">
                <div class="backto" @click="backtostatus">返回</div>
                <div class="huishouzhan" @click="enterhuishouzhan">回收站</div>
                <div class="mtclick" @click="getAllMtStatus">美团</div>
                <div class="eleclick" @click="getAllEleStatus">饿了么</div>
            </div>
            <div v-if="huishouzhan" class="huishou">
                <ul class="status_title">
                    <li style="width: calc(10% - 1px)">序号</li>
                    <li style="width: calc(20% - 1px)">店铺名称</li>
                    <li style="width: calc(25% - 1px)">店铺ID</li>
                    <li style="width: calc(25% - 1px)">店铺账号</li>
                    <li style="width: calc(20% - 1px)">恢复</li>
                </ul>
                <ul class="status_content" v-for="(shop,index) in mtdeletedshops" v-if="showdeletedmt">
                    <li style="width: calc(10% - 1px)">{{index}}</li>
                    <li style="width: calc(20% - 1px)">{{ shop.name }}</li>
                    <li style="width: calc(25% - 1px)">{{ shop.id }}</li>
                    <li style="width: calc(25% - 1px)">{{ shop.account }}</li>
                    <li style="width: calc(20% - 1px)"><span class="clickText" @click="recover(shop.id,shop.shoptype,index)">恢复</span></li>
                </ul>
                <ul class="status_content" v-for="(shop,index) in eledeletedshops" v-if="showdeletedele">
                    <li style="width: calc(10% - 1px)">{{index}}</li>
                    <li style="width: calc(20% - 1px)">{{ shop.name }}</li>
                    <li style="width: calc(25% - 1px)">{{ shop.id }}</li>
                    <li style="width: calc(25% - 1px)">{{ shop.account }}</li>
                    <li style="width: calc(20% - 1px)"><span class="clickText" @click="recover(shop.id,shop.shoptype,index)">恢复</span></li>
                </ul>

            </div>
            <ul class="status_title" v-if="showtitle">
                <li style="width: calc(14% - 1px)">店铺名称</li>
                <li style="width: calc(10% - 1px)">店铺ID</li>
                <li style="width: calc(7% - 1px)">系统开关</li>
                <li style="width: calc(7% - 1px)">平台开关</li>
                <li style="width: calc(7% - 1px)">生成计划</li>
                <li style="width: calc(17% - 1px)">推广时间</li>
                <li style="width: calc(17% - 1px)">营业时间</li>
                <li style="width: calc(7% - 1px)">删除</li>
                <li style="width: calc(7% - 1px)">更新</li>
                <li style="width: calc(7% - 1px)">已更新</li>
            </ul>
            <ul class="status_content" v-for="(shop,index) in mtshopstatus" v-if="nowtype == 1">
                <li style="width: calc(14% - 1px);cursor: pointer;" class="namehover" @click="enterShop(shop.id,shop.name,shop.shoptype,shop.status,shop.upd)">{{shop.name}}</li>
                <li style="width: calc(10% - 1px)">{{shop.id}}</li>
                <li style="width: calc(7% - 1px)">
                    <div class="cb-item_toggler" style="padding-top: 0">
                        <input type="checkbox" id="cb-item_toggler-11" class="cb-item_input" onclick="return false" checked="" v-model="shop.isEnable">
                        <label for="cb-item_toggler-11" class="cb-item_label">
                            <span class="cb-item_marker"></span>
                            <span class="cb-item_label-off" style="font-size: 14px;">关</span>
                            <span class="cb-item_label-on" style="font-size: 14px;">开</span>
                        </label>
                    </div>
                </li>

                <li style="width: calc(7% - 1px)">
                    <div class="cb-item_toggler" style="padding-top: 0">
                        <input type="checkbox" id="cb-item_toggler-12" class="cb-item_input" onclick="return false" checked="" v-model="!shop.status">
                        <label for="cb-item_toggler-12" class="cb-item_label">
                            <span class="cb-item_marker"></span>
                            <span class="cb-item_label-off" style="font-size: 14px;">关</span>
                            <span class="cb-item_label-on" style="font-size: 14px;">开</span>
                        </label>
                    </div>
                </li>
                <li style="width: calc(7% - 1px)">
                    <div class="cb-item_toggler" style="padding-top: 0">
                        <input type="checkbox" id="cb-item_toggler-13" class="cb-item_input" onclick="return false" checked="" v-model="shop.plans">
                        <label for="cb-item_toggler-13" class="cb-item_label">
                            <span class="cb-item_marker"></span>
                            <span class="cb-item_label-off" style="font-size: 14px;">无</span>
                            <span class="cb-item_label-on" style="font-size: 14px;">有</span>
                        </label>
                    </div>
                </li>
                <li style="width: calc(17% - 1px)">{{shop.adTime}}</li>
                <li style="width: calc(17% - 1px)">{{shop.shipTime}}</li>
                <li style="width: calc(7% - 1px)">
                    <!--<span class="updshiptimebtn" style="color: #0d6aad;cursor: pointer;">删除</span>-->
                    <div class="clickText" @click="deletethisshop(shop.id,shop.name,shop.shoptype,index)">删除</div>
                </li>
                <li style="width: calc(7% - 1px)"><span class="updshiptimebtn" @click="updShiptime(shop.id,shop.shoptype,index)" style="color: #0d6aad;cursor: pointer;">更新</span></li>
                <li style="width: calc(7% - 1px)"><span style="color: green" v-if="shop.upd == 1">✔</span></li>
            </ul>
            <ul class="status_content" v-for="(shop,index) in eleshopstatus" v-if="nowtype == 2">
                <li style="width: calc(14% - 1px);cursor: pointer;" class="namehover" @click="enterShop(shop.id,shop.name,shop.shoptype,shop.status,shop.upd)">{{shop.name}}</li>
                <li style="width: calc(10% - 1px)">{{shop.id}}</li>
                <li style="width: calc(7% - 1px)">
                    <div class="cb-item_toggler" style="padding-top: 0">
                        <input type="checkbox" id="cb-item_toggler-14" class="cb-item_input" onclick="return false" checked="" v-model="shop.isEnable">
                        <label for="cb-item_toggler-14" class="cb-item_label">
                            <span class="cb-item_marker"></span>
                            <span class="cb-item_label-off" style="font-size: 14px;">关</span>
                            <span class="cb-item_label-on" style="font-size: 14px;">开</span>
                        </label>
                    </div>
                </li>
                <li style="width: calc(7% - 1px)">
                    <div class="cb-item_toggler" style="padding-top: 0">
                        <input type="checkbox" id="cb-item_toggler-15" class="cb-item_input" onclick="return false" checked="" v-model="!shop.status">
                        <label for="cb-item_toggler-15" class="cb-item_label">
                            <span class="cb-item_marker"></span>
                            <span class="cb-item_label-off" style="font-size: 14px;">关</span>
                            <span class="cb-item_label-on" style="font-size: 14px;">开</span>
                        </label>
                    </div>
                </li>
                <li style="width: calc(7% - 1px)">
                    <div class="cb-item_toggler" style="padding-top: 0">
                        <input type="checkbox" id="cb-item_toggler-16" class="cb-item_input" onclick="return false" checked="" v-model="shop.plans">
                        <label for="cb-item_toggler-16" class="cb-item_label">
                            <span class="cb-item_marker"></span>
                            <span class="cb-item_label-off" style="font-size: 14px;">无</span>
                            <span class="cb-item_label-on" style="font-size: 14px;">有</span>
                        </label>
                    </div>
                </li>
                <li style="width: calc(17% - 1px)">{{shop.adTime}}</li>
                <li style="width: calc(17% - 1px)">{{shop.shipTime}}</li>
                <li style="width: calc(7% - 1px)">
                    <div class="clickText" @click="deletethisshop(shop.id,shop.name,shop.shoptype,index)">删除</div>
                </li>
                <li style="width: calc(7% - 1px)"><span class="updshiptimebtn" @click="updShiptime(shop.id,shop.shoptype,index)" style="color: #0d6aad;cursor: pointer;">更新</span></li>
                <li style="width: calc(7% - 1px)"><span style = "color:green;" v-if="shop.upd == 1">✔</span></li>
            </ul>
            <div class="line"></div>
        </div>
    </template>
    <template id="datapreparedtemp">
        <div id="report" v-loading="loading" element-loading-text="拼命获取中" element-loading-spinner="el-icon-loading" >
            <div style="text-align: center;font-weight: 600;font-size: 16px;margin-top: 10px;margin-bottom: 10px;">运营报告数据检查及获取</div>
            <table class="layui-table" lay-skin="line">
            <colgroup>
                <col>
                <col>
                <col>
                <col>
                <col>
                <col>
            </colgroup>
            <thead>
                <tr>
                    <th>序号</th>
                    <th>店铺ID</th>
                    <th>账号</th>
                    <th>店名</th>
                    <th>报告数据</th>
                    <th>获取数据</th>
                </tr>
            </thead>
            <tbody>
                <tr v-for="(result,index) in checkResult">
                    <td>{{ index + 1 }}</td>
                    <td>{{ result.shopId }}</td>
                    <td>{{ result.account }}</td>
                    <td>{{ result.shopName }}</td>
                    <td style="text-align: center">
                        <i v-if="result.hasReportData == 1" class="layui-icon" style="color: green">&#xe617;</i>
                        <i v-if="result.hasReportData == 0" class="layui-icon" style="color: red">&#xe617;</i>
                    </td>

                    <td style="color: rgb(13, 106, 173);" class="clickText">
                        <p v-if="result.hasReportData == 1" style="color: green;">无需获取</p>
                        <p v-if="result.hasReportData == 0" @click="getReportData(result.shopId,index)">获取数据</p>
                    </td>
                </tr>


            </tbody>
        </table>
        </div>

    </template>
    <template id="exceptiontemp">
        <div>
            <div style="width: 100%;height: 32px;margin-top: 20px;" >
                <div class="title" v-if="hideExceptionBtn">
                    <a href="#" class="btn btn--activate" id="btnActivation" @click="exceptionActived" @mouseover="exceptionHover">
                        <span class="btn__icon"></span>
                        <span class="btn__text" data-wait="请稍后" data-after="检查完成">异常检查</span>
                    </a>
                </div>
            </div>
            <div class="load" v-if="loadflag">
                <div class="loader2" title="2">
                    <svg version="1.1" id="loader-2"  x="0px" y="0px" width="100px" height="100px" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;" xml:space="preserve">
                        <path fill="#000" d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z">
                            <animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="0.6s" repeatCount="indefinite" />
                        </path>
                    </svg>
                    <div class="load-msg"> 异常检查中,请稍后....</div>
                </div>
            </div>
            <div class="exceptionContent" style="margin-top: 20px;">
                <ul class="exceptionTitle" v-if="exceptionClick">
                    <li style="width: calc(5% - 1px);">序号</li>
                    <li style="width: calc(14% - 1px);">店铺</li>
                    <li style="width: calc(14% - 1px);">格式化时间</li>
                    <li style="width: calc(14% - 1px);">营/推检查</li>
                    <li style="width: calc(15% - 1px);">推广检查</li>
                    <li style="width: calc(14% - 1px);">计划检查</li>
                    <li style="width: calc(14% - 1px);">日志检查</li>
                    <li style="width: calc(10% - 1px);">异常</li>
                </ul>
                <ul  class="exceptionList" v-for="(exception, index) in exceptionList">
                    <li style="width: calc(5% - 1px);" v-if="exception.date != '' ">{{ index + 1 }}</li>
                    <li style="width: calc(14% - 1px);" v-if="exception.date != '' ">{{ exception.date.shopName }}</li>
                    <li style="width: calc(14% - 1px);" v-if="exception.date != '' ">{{ exception.date.message[0] }}</li>
                    <li style="width: calc(14% - 1px);" v-if="exception.date != '' ">{{ exception.date.message[1] }}</li>
                    <li style="width: calc(15% - 1px);" v-if="exception.date != '' ">{{ exception.date.message[2] }}</li>
                    <li style="width: calc(14% - 1px);" v-if="exception.date != '' ">{{ exception.date.message[3] }}</li>
                    <li style="width: calc(14% - 1px);" v-if="exception.date != '' ">{{ exception.date.message[4] }}</li>
                    <li style="width: calc(10% - 1px);"  v-if="exception.error==1">
                        <div class="redBtn"></div>
                    </li>
                    <li style="width: calc(10% - 1px);"  v-if="exception.error==0">
                        <div class="greenBtn"></div>
                    </li>
                </ul>
            </div>
        </div>

    </template>
</body>

    <script type="text/javascript" src='js/rightAsk.js'></script>
    <script src="js/notiflix-1.3.0.min.js" type="text/javascript"></script>
    <script>

        /*消息弹窗模块
        * */
        Notiflix.Notify.Init();
        Notiflix.Report.Init();
        Notiflix.Confirm.Init();
        Notiflix.Loading.Init({
            clickToClose:true
        });


            new Vue({
                el:'#app',
                data:{
                    mtlst:[],
                    elelst:[],
                    mtflag : true,
                    eleflag : true,
                    nowid:0,
                    loglst:[],
                    planlst:[],
                    planlsttomorrow:[],
                    type:'',
                    comindex : -1,
                    mtfind :'',
                    elefind:'',
                    shoptype:1,
                    exposure_myshop:[],
                    exposure_othertopshop:[],
                    exposure_percent:[],
                    orderrate_myshop:[],
                    orderrate_othertopshop:[],
                    orderrate_percent:[],
                    time:[],
                    visitrate_myshop:[],
                    visitrate_othertopshop:[],
                    visitrate_percent:[],
                    conclution1 : "",
                    conclution2 : "",
                    conclution3 : "",
                    lognull : false,
                    isactive : -1,
                    mtisactive:-1,
                    shopname:'',
                    showAddShop : false,
                    infoshow : false,
                    loadflag : false,
                    newShop:{
                    name : '',
                    account : '',
                    maxPrice : '',
                    minPrice : '',
                    isEnable : true,
                    isBind : true,
                    isByBudget : false,
                    budget : 0,
                    targetExposure : 0,
                    shopType : 2,
                    manager : '',

                    },
                    biddingstatusbtn : false,
                    isopen : false,
                    mtShopNum : 0,
                    eleShopNum : 0,
                    loading : false,


                },
                created(){
                    this.getallshops();

                },
            methods :{
                exception:function(){
                    this.showAddShop = false
                    this.comindex = 8
                },
                setPreparedData:function(){
                    this.showAddShop = false
                    this.comindex = 7
                },
                enter:function(shopId,shopName,shopType,biddingBtn,isopen){
                    console.log("进入设置组件" + shopId + " " + shopName + " " + shopType + isopen)
                    console.log(biddingBtn)
                    this.comindex = 3
                    this.nowid = shopId
                    this.shopname = shopName
                    this.shoptype = shopType
                    this.biddingstatusbtn = biddingBtn
                    this.isopen = isopen
                    console.log(shopId + "  " + this.nowid)
                },
                getShopStatus:function(){
                    this.showAddShop = false
                    this.comindex = 6

               },
                getOrder:function(){
                    this.showAddShop = false
                    if(this.nowid == 0){
                        Notiflix.Notify.Warning('请先选择店铺,然后操作');
                    }else{
                        this.comindex = 5
                    }
               },
                saveNewShop:function() {
                    isByBudget = 0
                    this.infoshow = true
                    if (this.newShop.isByBudget){
                       isByBudget = 1
                    }
                    isBind = 0
                    if (this.newShop.isBind){
                       isBind = 1
                    }
                    isEnable = 0
                    if (this.newShop.isEnable){
                       isEnable = 1
                    }
                    var that = this
                    axios({
                        method:'get',
                        url: 'http://47.111.126.241:3818/api/v1/saveNewShop',
                        params:{
                            name: this.newShop.name,
                            account: this.newShop.account,

                            maxPrice: this.newShop.maxPrice,
                            minPrice: this.newShop.minPrice,
                            isEnable: isEnable,
                            isBind: isBind,
                            budget: this.newShop.budget,
                            targetExposure: this.newShop.targetExposure,
                            isByBudget: isByBudget,
                            shopType: this.newShop.shopType,
                            manager: this.newShop.manager,
                        },

                        }).then(function(response) {
                            that.infoshow = false
                            alert(response.data.message)
                    });
               },
                getallshops:function(){
                    this.loadflag = true
                    this.showAddShop = false
                    var that = this
                    axios({
			            method:'get',
			            url: 'http://47.111.126.241:3818/api/v1/getAllShop',
                        }).then(function(response){

                            result = response.data
                            that.loadflag = false
                            result = result.data

                            that.mtlst =  result[0]
                            that.mtShopNum = that.mtlst.length
                            that.elelst = result[1]
                            that.eleShopNum = that.elelst.length
                        });
                },
                findmt:function(){
                    this.showAddShop = false
                    var that = this
                    axios({
			            method:'get',
                        params:{
                            findby : that.mtfind,
                            type : 1
                        },
			            url: 'http://47.111.126.241:3818/api/v1/findshop',
                        }).then(function(response){
                            resp = response.data
                            if(resp.code == 404){
                                alert("没有该店铺")
                            }else if(resp.code == 500){
                                alert("未知错误")
                            }
                            else{
                                that.nowid = resp.data
                                that.comindex = 1
                                that.getlog(that.nowid,1)
                            }

                    });
                },
                findele:function(){
                    this.showAddShop = false
                    var that = this
                    axios({
			            method:'get',
                        params:{
                            findby : that.elefind,
                            type : 2
                        },
			            url: 'http://47.111.126.241:3818/api/v1/findshop',
                        }).then(function(response){
                            resp = response.data
                            if(resp.code == 404){
                                alert("没有该店铺")
                            }else if(resp.code == 500){
                                alert("未知错误")
                            }
                            else{
                                that.nowid = resp.data
                                that.comindex = 1
                                that.getlog(that.nowid,2)
                            }

                    });
                },
                getlog:function(id,shoptype,shopindex,name){
                    this.loading = true
                    this.showAddShop = false
                    this.shopname = name
                    this.biddingstatusbtn = false
                    this.comindex = 1
                    this.shoptype = shoptype
                    if (shoptype == 1){
                        this.type = "美团"
                        this.mtisactive = shopindex
                        this.isactive = -1
                    }else{
                        this.type = "饿了么"
                        this.isactive = shopindex
                        this.mtisactive = -1
                    }
                    var that = this
                    this.nowid = id
                    axios({
			            method:'get',
			            url: 'http://47.111.126.241:3818/api/v1/getShopLogs',
                        params:{
   		                    id : id
   	                    }
                        }).then(function(response){
                            logs = response.data
                            that.loading = false
                            console.log(logs)
                            that.loglst = logs.data
                            if(that.loglst.length == 0){
                                that.lognull = true
                            }else{
                                that.lognull = false
                            }
                        });
                },
                getplans:function(){
                    this.showAddShop = false
                    this.loadflag = true
                    if(this.nowid == 0){
                        Notiflix.Notify.Warning('请先选择店铺,然后操作');
                        this.loadflag = false
                    }else{
                        this.comindex = 2
                        var that = this
                        axios({
                            method:'get',
                            url: 'http://47.111.126.241:3818/api/v1/bidding/target/getplans',
                            params:{
                                id : that.nowid
                            }
                            }).then(function(response){
                                that.planlst = response.data.data[0]
                                that.planlsttomorrow = response.data.data[1]
                                that.loadflag = false
                                if (that.planlst.length == 0){
                                    that.type = ""
                                    Notiflix.Notify.Info('暂无计划');
                                }else{
                                    if (that.planlst[0].type == 1){
                                        that.type = "美团"
                                    }else{
                                        that.type = "饿了么"
                                    }
                                }
                        });
                    }
                },
                getTuiDetail:function () {
                    this.showAddShop = false
                    if(this.nowid == 0){
                        Notiflix.Notify.Warning('请先选择店铺,然后操作');
                    }else{
                        this.comindex = 4
                        var that = this
                        console.log(that.shoptype)
                        axios({
                            method:'get',
                            url: "http://47.111.126.241:3818/api/" +'v1/shop/getOverData',
                            params:{
                                id : that.nowid,
                                type : that.shoptype
                            }
                            }).then(function(response){
                                result  = response.data
                                console.log(result)
                                result = result.data
                                if(result==""){
                                    that.exposure_myshop = []
                                    that.exposure_othertopshop = []
                                    that.exposure_percent = []
                                    that.orderrate_myshop = []
                                    that.orderrate_othertopshop = []
                                    that.orderrate_percent = []
                                    that.time = []
                                    that.visitrate_myshop = []
                                    that.visitrate_othertopshop = []
                                    that.visitrate_percent = []
                                    that.conclution1 = ''
                                    that.conclution2 = ''
                                    that.conclution3 = ''
                                    alert("暂时无法获取数据")
                                }else {
                                    that.exposure_myshop = result.exposure.myShop
                                    that.exposure_othertopshop = result.exposure.otherTopShop
                                    that.exposure_percent = result.exposure.percent
                                    that.orderrate_myshop = result.orderRate.myShop
                                    that.orderrate_othertopshop = result.orderRate.otherTopShop
                                    that.orderrate_percent = result.orderRate.percent
                                    that.time = result.time
                                    that.visitrate_myshop = result.visitRate.myShop
                                    that.visitrate_othertopshop = result.visitRate.otherTopShop
                                    that.visitrate_percent = result.visitRate.percent
                                    var percentsum2 = 0
                                    for (var i = 0; i < that.visitrate_percent.length; i++) {
                                        that.visitrate_percent[i] = that.visitrate_percent[i].toFixed(3)
                                        percentsum2 = percentsum2 + that.visitrate_percent[i]
                                    }
                                    var percentsum = 0
                                    for (var i = 0; i < that.exposure_percent.length; i++) {
                                        that.exposure_percent[i] = that.exposure_percent[i].toFixed(3)
                                        //保留三位小数，并求和
                                        percentsum = percentsum + that.exposure_percent[i]
                                    }
                                    var percentsum3 = 0
                                    for (var i = 0; i < that.orderrate_percent.length; i++) {
                                        that.orderrate_percent[i] = that.orderrate_percent[i].toFixed(3)
                                        percentsum3 = percentsum3 + that.orderrate_percent[i]
                                    }
                                    //如果j4小于1.3
                                    if (that.exposure_percent[6] < 1.3) {
                                        that.conclution1 = "本店曝光流量不够"
                                    } else if (that.exposure_percent[6] < percentsum / 7 * 0.9) {
                                        that.conclution1 = "本店昨天曝光量大降"
                                    } else if (that.exposure_percent[6] < percentsum / 7 * 0.8) {
                                        that.conclution1 = "本店昨天曝光量出现严重问题,请立即排查"
                                    }
                                    if (that.visitrate_percent[6] < 1) {
                                        that.conclution2 = "本店入店转化率低"
                                    } else if (that.visitrate_percent[6] < 0.9) {
                                        that.conclution2 = "本店入店转化率低,请立即调整"
                                    } else if (that.visitrate_percent[6] < percentsum2 / 7 * 0.9) {
                                        that.conclution2 = "本店昨天入店转化率出现问题"
                                    } else if (that.visitrate_percent[6] < percentsum2 / 7 * 0.8) {
                                        that.conclution2 = "本店昨天入店转化率出现严重问题,请马上解决"
                                    }
                                    if (that.orderrate_percent[6] < 1) {
                                        that.conclution3 = "本店下单转化率低"
                                    } else if (that.orderrate_percent[6] < 0.9) {
                                        that.conclution3 = "本店下单转化率低,请立即调整"
                                    } else if (that.orderrate_percent[6] < percentsum3 / 7 * 0.9) {
                                        that.conclution3 = "本店昨天下单转化率出现问题"
                                    } else if (that.orderrate_percent[6] < percentsum3 / 7 * 0.8) {
                                        that.conclution3 = "本店昨天下单转化率出现严重问题,请马上解决"
                                    }
                                }
                        });

                    }

                },
                setbidding:function () {
                    this.showAddShop = false
                    if(this.nowid == 0){
                        Notiflix.Notify.Warning('请先选择店铺,然后操作');
                    }else{
                        this.comindex = 3
                    }
                }

            },
            components:{
                biddinglogcom :{
                    template : "#biddinglogtemp",
                    props:['parentloglst','parentlognull','parentshopname','parentnowid','parentloading'],
                    data(){
                       return {
                           daytime : '',
                           dayval : 0,
                           logscontent : [],
                           parentlog: true,
                           sonlog : false,
                           loadflag : false,
                           lognull : false,
                           loading : false,
                       }
                   },
                    created(){
                        var day2 = new Date();
                        day2.setTime(day2.getTime());
                        var s2 = day2.getFullYear()+"-" + (day2.getMonth()+1) + "-" + day2.getDate();
                        this.daytime = s2
                    },
                    methods:{
                        changebefore:function(){
                            this.loadflag = true
                            this.parentlog = false
                            this.sonlog = true
                            this.dayval -= 1
                            var day3 = new Date();
                            day3.setTime(day3.getTime()+24*60*60*1000*this.dayval);
                            var s3 = day3.getFullYear()+"-" + (day3.getMonth()+1) + "-" + day3.getDate();

                            this.daytime = s3
                            var that = this

                            axios({
                                method:'get',
                                url: 'http://47.111.126.241:3818/api/v1/getShopLogs',
                                params:{
                                    id : that.parentnowid,
                                    time : that.daytime
                                }
                            }).then(function(response){
                                logs = response.data
                                that.logscontent = logs.data
                                if(that.logscontent.length == 0){
                                    that.lognull = true
                                }else{
                                    that.lognull = false
                                }
                                that.loadflag = false
                            });

                        },
                        changeafter:function(){
                            this.parentlog = false
                            this.sonlog = true
                            this.dayval += 1
                            var day3 = new Date();
                            day3.setTime(day3.getTime()+24*60*60*1000*this.dayval);
                            var s3 = day3.getFullYear()+"-" + (day3.getMonth()+1) + "-" + day3.getDate();


                            var day2 = new Date();
                            day2.setTime(day2.getTime());
                            var s2 = day2.getFullYear()+"-" + (day2.getMonth()+1) + "-" + day2.getDate();
                            if (s3<=s2){
                                this.daytime = s3
                                this.loadflag = true

                                var that = this
                                axios({
                                    method:'get',
                                    url: 'http://47.111.126.241:3818/api/v1/getShopLogs',
                                    params:{
                                        id : that.parentnowid,
                                        time : that.daytime
                                    }
                                }).then(function(response){
                                    logs = response.data
                                    that.logscontent = logs.data
                                    if(that.logscontent.length == 0){
                                        that.lognull = true
                                    }else{
                                        that.lognull = false
                                    }
                                    that.loadflag = false

                                });
                            }else{
                                this.dayval -= 1
                                this.parentlog = true
                                this.sonlog = false
                            }




                        }
                    }
                },
                biddingplancom :{
                    template : "#biddingplantemp",
                    props:['parentplanlst','parenttype','parentshopname','parentplanlsttomorrow'],
                    data(){
                        return {
                            tomorrow : false,
                            today : true
                        }
                    },
                    methods:{
                        changeDayPlan:function(index){
                            if (index == 0){
                                this.today = true
                                this.tomorrow = false
                                $("#today").css("text-decoration","underline")
                                $("#today").css("font-size","15px")
                                $("#today").css("font-weight","600")
                                $("#tomorrow").css("font-weight","500")
                                $("#tomorrow").css("text-decoration","None")
                                $("#tomorrow").css("font-size","12px")
                            }else{
                                this.today = false
                                this.tomorrow = true
                                $("#tomorrow").css("text-decoration","underline")
                                $("#tomorrow").css("font-size","15px")
                                $("#tomorrow").css("font-weight","600")
                                $("#today").css("font-weight","500")
                                $("#today").css("text-decoration","None")
                                $("#today").css("font-size","12px")
                            }
                        },
                    }
                },
                getordercom:{
                    template:'#biddinggetordertemp',
                    props:['parentshopname','parenttype','parentnowid','parentshoptype'],
                    data(){
                        return{
                            day1order :[],
                            day2order :[],
                            day3order :[],
                            day4order :[],
                            day5order :[],
                            day6order :[],
                            day7order :[],
                            dayTime :[],
                            day1null:false,
                            day2null:false,
                            day3null:false,
                            day4null:false,
                            day5null:false,
                            day6null:false,
                            day7null:false,
                            isgetting1:false,
                            isgetting2:false,
                            isgetting3:false,
                            isgetting4:false,
                            isgetting5:false,
                            isgetting6:false,
                            isgetting7:false,
                        }
                    },
                    created(){
                        console.log("获取订单组件")
                        var that = this
                        that.loadflag = true
                        axios({
                        method:'get',
                        url: 'http://47.111.126.241:3818/api/v1/getShopOrder',
                        params:{
                            id : that.parentnowid
                        }
                        }).then(function(response){

                        result = response.data
                        that.loadflag = false
                        result = result.data

                        console.log(result)
                        that.day1order = result.day1.infoList
                        that.day2order = result.day2.infoList
                        that.day3order = result.day3.infoList
                        that.day4order = result.day4.infoList
                        that.day5order = result.day5.infoList
                        that.day6order = result.day6.infoList
                        that.day7order = result.day7.infoList
                        that.dayTime = result.dayTime
                        if(result.day1.null == 1){
                            that.day1null = true
                        }
                        if(result.day2.null == 1){
                            that.day2null = true
                        }
                        if(result.day3.null == 1){
                            that.day3null = true
                        }
                        if(result.day4.null == 1){
                            that.day4null = true
                        }
                        if(result.day5.null == 1){
                            that.day5null = true
                        }
                        if(result.day6.null == 1){
                            that.day6null = true
                        }
                        if(result.day7.null == 1){
                            that.day7null = true
                        }
                        if(!that.day1null && !that.day2null && !that.day3null && !that.day4null && !that.day5null && !that.day6null &&!that.day7null){
                            Notiflix.Notify.Success('无需获取任何订单');
                        }
                        });
                    },
                    methods:{
                        getCurrentOrder:function(index){
                            var that = this
                            if(index == 1){
                                that.isgetting1 = true
                            }else if(index == 2){
                                that.isgetting2 = true
                            }
                            else if(index == 3){
                                that.isgetting3 = true
                            }
                            else if(index == 4){
                                that.isgetting4 = true
                            }
                            else if(index == 5){
                                that.isgetting5 = true
                            }
                            else if(index == 6){
                                that.isgetting6 = true
                            }
                            else if(index == 7){
                                that.isgetting7 = true
                            }
                            axios({
                                method:'get',
                                url: 'http://47.111.126.241:3818/api/v1/shop/getCurrentOrder',
                                params:{
                                    id : that.parentnowid,
                                    index : index,
                                }
                            }).then(function(response){
                                response = response.data
                                console.log(response)
                                if (response.code == 500){

                                    if(index == 1){
                                        that.isgetting1 = false
                                    }else if(index == 2){
                                        that.isgetting2 = false
                                    }
                                    else if(index == 3){
                                        that.isgetting3 = false
                                    }
                                    else if(index == 4){
                                        that.isgetting4 = false
                                    }
                                    else if(index == 5){
                                        that.isgetting5 = false
                                    }
                                    else if(index == 6){
                                        that.isgetting6 = false
                                    }
                                    else if(index == 7){
                                        that.isgetting7 = false
                                    }

                                    Notiflix.Notify.Failure('获取订单失败');

                                }else{
                                    if(index == 1){
                                        that.day1null = false
                                        that.day1order = response.data

                                    }else if(index == 2){
                                        that.day2null = false
                                        that.day2order = response.data
                                    }else if(index == 3){
                                        that.day3null = false
                                        that.day3order = response.data
                                    }else if(index == 4){
                                        that.day4null = false
                                        that.day4order = response.data
                                    }else if(index == 5){
                                        that.day5null = false
                                        that.day5order = response.data
                                    }else if(index == 6){
                                        that.day6null = false
                                        that.day6order = response.data
                                    }else if(index == 7){
                                        that.day7null = false
                                        that.day7order = response.data
                                    }
                                    Notiflix.Notify.Info('获取订单成功');
                                }

                                });
                            }
                        }
                },
                tuidetailcom:{
                   template:"#tuidetailtemp",
                    props:['parenttime','parentexposure_myshop','parentexposure_othertopshop','parentexposure_percent',
                    'parentvisitrate_myshop','parentvisitrate_othertopshop','parentvisitrate_percent','parentorderrate_myshop',
                        'parentorderrate_othertopshop','parentorderrate_percent','parentconclution1','parentconclution2',
                        'parentconclution3','parentshopname'
                    ],
                    data(){
                       return {}
                    }
                },
                biddingsetcom:{
                    template:"#biddingsettemp",
                    props:['parenttype','parentnowid','parentshoptype','parentshopname','parentisopen','parentbiddingstatusbtn'],
                    data(){
                        return {
                            timeindex:1,
                            hours:['00','01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23', '24'],
                            mins:['00','05','10','15','20','25','30','35','40','45','50','55'],
                            s1h1:'00',
                            s1m1:'00',
                            s1h2:'00',
                            s1m2:'00',
                            s1p:'1',
                            s2h1:'00',
                            s2m1:'00',
                            s2h2:'00',
                            s2m2:'00',
                            s2p:'1',
                            s3h1:'00',
                            s3m1:'00',
                            s3h2:'00',
                            s3m2:'00',
                            s3p:'1',
                            s4h1:'00',
                            s4m1:'00',
                            s4h2:'00',
                            s4m2:'00',
                            s4p:'1',
                            t1h1:'00',
                            t1m1:'00',
                            t1h2:'00',
                            t1m2:'00',
                            t1p1:'',
                            t1p2:'',
                            t1p3:'',
                            t1p4:'',
                            t1p5:'',
                            t2h1:'00',
                            t2m1:'00',
                            t2h2:'00',
                            t2m2:'00',
                            t2p1:'',
                            t2p2:'',
                            t2p3:'',
                            t2p4:'',
                            t2p5:'',
                            t3h1:'00',
                            t3m1:'00',
                            t3h2:'00',
                            t3m2:'00',
                            t3p1:'',
                            t3p2:'',
                            t3p3:'',
                            t3p4:'',
                            t3p5:'',
                            lock : false,
                            biddingset:{
                                shopname:'',
                                shopaccount:'',
                                reduceprice:0.1,
                                increaseprice: 0.1,
                                maxprice: "---",
                                minprice: "---",
                                isenable:0,
                                isbind: true,
                                budget:0,
                                targetexposure:0,
                                orders:'',
                                adTime:'',
                                isbybudget: false,
                                shopid:0,
                                specialtime:'',
                                deleted : false,
                                idleExposureRate : 0,
                            },
                            row1orderlist:[],
                            row2orderlist:[],
                            row3orderlist:[],
                            rate:{
                               r1:0,
                               r2:0,
                               r3:0,
                               r4:0,
                               r5:0,
                               r6:0,
                               r7:0,
                               r8:0,
                               r9:0,
                               r10:0,
                               r11:0,
                               r12:0,
                               r13:0,
                               r14:0,
                               r15:0,
                               r16:0,
                               r17:0,
                               r18:0,
                               r19:0,
                               r20:0,
                               r21:0,
                               r22:0,
                               r23:0,
                               r24:0,
                               r25:0,
                               r26:0,
                               r27:0,
                               r28:0,
                               r29:0,
                               r30:0,
                               r31:0,
                               r32:0,
                               r33:0,
                               r34:0,
                               r35:0,
                               r36:0,
                               r37:0,
                               r38:0,
                               r39:0,
                               r40:0,
                               r41:0,
                               r42:0,
                               r43:0,
                               r44:0,
                               r45:0,
                               r46:0,
                               r47:0,
                               r48:0,
                            },
                            keepsame:false,
                            rates48 : [],
                            wait:0,
                            specialindex : 1,
                            rateinput:5,
                            busylist:[],
                            idlelist:[],
                            busyp1:0.9,
                            busyp2:0.9,
                            busyp3:0.9,
                            busyp4:-1,
                            busyp5:-1,
                            busyp6:-1,
                            busyp7:-1,
                            idlep1:0.9,
                            idlep2:0.9,
                            idlep3:0.9,
                            idlep4:-1,
                            idlep5:-1,
                            idlep6:-1,
                            idlep7:-1,
                            para :0,

                            servicetime : 30,
                            servicestart : '2020-01-01',
                            serviceend : '2020-12-31',
                            advicemax : 0,
                            advicemin : 0,
                            advicebudget : 0,
                            advicetarget : 0,
                            sevenAvgPrice : 0,
                            sevenAvgIncome : 0,
                            allCost: 0,
                            allExposure :0,
                            havenGot : false,
                            gottext : '获取最新参数',
                            biddingisopen : false,
                            guard : false,
                            hisBid : false,
                            curbiddate : '2019-10-27',
                            curbid1 : [],
                            curbid2 : [],
                            curbid3 : [],
                            showCurbid : false,
                            historymode : false,
                            budgetflag : false,
                            setDateFlag : false,
                            lowpricemode : false,
                            newbudget: '',
                            currentbudget : 100,
                            originalOpen : 0,
                            busyOrderRate : '',
                            idleMaxPriceList : ['','','','','','','','','','','','','','',''],
                            idleOrderRateList : ['','','','','','','','','','','','','','',''],
                            loading : false,
                            daysAvgPrice : '',
                            allExposureRate : 0,
                            baseRate : 0.9,
                            busyTimeLock : false,
                            controlRate : 0.3,
                            nextExposureRate : 1,
                            updExposureRate : 1,
                            nearExposure : 1,
                            todayExposureRate : 1,
                            isCreating : false,
                        }
                    },
                    created(){
                        if (this.parentisopen + '' == '0'){
                            this.biddingisopen = true
                        }else{
                            this.biddingisopen = false
                        }

                        console.log(this.parentisopen + "父组件isopen   " + this.biddingisopen)
                        reqparam = {}
                        if(this.parentshoptype == 1){
                            reqparam = {mtId:this.parentnowid}
                        }else{
                            reqparam = {eleId:this.parentnowid}
                        }
                        var that =  this

                        layui.use('layer', function(){
                            var layer = layui.layer;

                            var index = layer.load(2);
                            axios({
                            method:'get',
                            params:reqparam,
                            url: 'http://47.111.126.241:3818/api/v1/shop/getMeun'
                            }).then(function(response){
                                layer.close(index);
                                resp = response.data
                                if(resp.code == 500){
                                    Notiflix.Notify.Failure(resp.message);
                                }else{
                                }
                                rates = resp.data[1]
                                orders =  resp.data[2]
                                resp = resp.data[0]
                                console.log(resp)
                                if(rates == null || rates == ""){

                                }else{
                                    rates = eval("("+rates+")");
                                    that.rates48 = rates
                                    for(var i = 1; i <= 48; i++){
                                        s = 'r'+i
                                        that.rate[s] = rates[i-1]
                                    }
                                }
                                if (orders == "" || orders==null){
                                }else{
                                    orders = eval("("+orders+")");
                                    that.row1orderlist = orders.slice(0,16)
                                    that.row2orderlist = orders.slice(16,32)
                                    that.row3orderlist = orders.slice(32,48)
                                }

                                that.nextExposureRate = resp.nextExposureRate
                                that.biddingset.shopaccount = resp.account
                                that.biddingset.shopname = resp.shopname
                                that.biddingset.isbind = resp.isbind
                                that.biddingset.isenable = resp.isenable
                                that.biddingset.isbybudget = resp.isbybudget
                                that.biddingset.budget = resp.budget
                                that.biddingset.targetexposure = resp.targetExposure
                                
                                that.biddingset.idleExposureRate = resp.idleExposureRate
                                that.daysAvgPrice = resp.daysAvgPrice
                                that.busyOrderRate = resp.busyOrderRate
                                that.idleOrderRateList = resp.idleOrderRateList
                                that.idleMaxPriceList = resp.idleMaxPriceList
                                that.allExposureRate = resp.allExposureRate
                                that.todayExposureRate = resp.todayExposureRate == 0 ? 1 : resp.todayExposureRate

                                if (resp.busyTimeLock + "" == "1"){
                                    that.busyTimeLock = true
                                }else{
                                    that.busyTimeLock = false
                                }




                                that.controlRate = resp.controlRate
                                that.baseRate = resp.baseRate



                                that.biddingset.shopid = resp.shopid
                                that.guard = resp.guard
                                that.historymode = resp.historyMode

                                that.currentbudget = resp.todayBudget
                                that.showCurbid = false
                                if (resp.deleted == 1){
                                    that.biddingset.deleted = true
                                }else{
                                    that.biddingset.deleted = false
                                }
                                lock = resp.lock
                                if(lock == 1){
                                    that.lock = true
                                }else{
                                    that.lock = false
                                }

                                adTime = resp.adTime
                                specialtime = resp.specialtime
                                if (resp.serviceTime!='' || resp.serviceTime != null){

                                }
                                if(resp.keepSameStatus == 1){
                                    that.keepsame = true
                                }else {
                                    that.keepsame = false
                                }
                                console.log("这里出错了么000?")
                                adTime = eval("("+adTime+")");
                                len = adTime.length
                                that.timeindex = len
                                for(var i = 0; i < len; i++){
                                    if (i == 0){
                                        handm = adTime[i].s.split(":")
                                        that.s1h1 = handm[0]
                                        that.s1m1 = handm[1]
                                        handm = adTime[i].e.split(":")
                                        that.s1h2 = handm[0]
                                        that.s1m2 = handm[1]
                                        that.s1p = adTime[i].p
                                    }else if(i == 1){
                                        handm = adTime[i].s.split(":")
                                        that.s2h1 = handm[0]
                                        that.s2m1 = handm[1]
                                        handm = adTime[i].e.split(":")
                                        that.s2h2 = handm[0]
                                        that.s2m2 = handm[1]
                                        that.s2p = adTime[i].p
                                    }else if(i == 2){
                                        handm = adTime[i].s.split(":")
                                        that.s3h1 = handm[0]
                                        that.s3m1 = handm[1]
                                        handm = adTime[i].e.split(":")
                                        that.s3h2 = handm[0]
                                        that.s3m2 = handm[1]
                                        that.s3p = adTime[i].p
                                    }else if(i == 3){
                                        handm = adTime[i].s.split(":")
                                        that.s4h1 = handm[0]
                                        that.s4m1 = handm[1]
                                        handm = adTime[i].e.split(":")
                                        that.s4h2 = handm[0]
                                        that.s4m2 = handm[1]
                                        that.s4p = adTime[i].p
                                    }
                                }
                                console.log("这里出错了么?111")

                                if (specialtime != null && specialtime != '') {
                                    specialtime = eval("(" + specialtime + ")")
                                    len = specialtime.length
                                    //that.specialindex = len
                                    that.busylist = []
                                    that.idlelist = []

                                    for (var i = 0; i < len; i++) {
                                        if(specialtime[i].type == 1){
                                            that.busylist.push({s:specialtime[i].s,e:specialtime[i].e})
                                            that.busyp1 = 0.9
                                            that.busyp2 = 0.9
                                            that.busyp3 = 0.9
                                            that.busyp4 = specialtime[i].p4
                                            that.busyp5 = specialtime[i].p5
                                            that.busyp6 = specialtime[i].p6
                                            that.busyp7 = specialtime[i].p7
                                            that.rateinput = specialtime[i].rate

                                        }else{
                                            that.idlelist.push({s:specialtime[i].s,e:specialtime[i].e})
                                            that.idlep1 = 0.9
                                            that.idlep2 = 0.9
                                            that.idlep3 = 0.9
                                            that.idlep4 = specialtime[i].p4
                                            that.idlep5 = specialtime[i].p5
                                            that.idlep6 = specialtime[i].p6
                                            that.idlep7 = specialtime[i].p7
                                            that.rateinput = specialtime[i].rate
                                        }
                                    }
                                }
                                console.log("这里出错了么222?")
                                if(that.keepsame){
                                    lst = "["+that.row1orderlist +","+ that.row2orderlist +","+ that.row3orderlist +"]"
                                    lst = eval("("+lst+")");
                                    for(var i = 1; i <= 48; i++){
                                        s = 'r'+i
                                        that.rate[s] = lst[i-1]
                                    }
                                }else{
                                    //使用原来值
                                    if(that.rates48.length == 48){
                                        for(var i = 1; i <= 48; i++){
                                            s = 'r'+i
                                            that.rate[s] = that.rates48[i-1]
                                        }
                                    }
                                }
                                console.log("这里出错了么333?")
                            });

                        });
                        axios({
                            method:'get',
                            url: 'http://47.111.126.241:3818/api/v1/getSuggestParam',
                            params:{
                                shopId : that.parentnowid,
                                shopType : that.parentshoptype
                            }
                            }).then(function(response){
                                response = response.data.data
                                that.advicemin = response.minPrice
                                that.advicemax = response.maxPrice
                                that.advicebudget = response.budget
                                that.advicetarget = response.targetExposure
                                that.sevenAvgPrice = response.sevenAvgPrice
                                that.sevenAvgIncome = response.sevenAvgIncome
                                that.allCost = response.allCost
                                that.allExposure = response.allExposure
                        });

                    },
                    mounted(){
                        if (this.parentisopen + '' == '0'){
                            this.biddingisopen = true
                        }else{
                            this.biddingisopen = false
                        }
                        console.log(this.biddingisopen+"挂载")
                        var that = this
                        this.$watch('rate',function(){
                            if (that.keepsame == true && that.para == 1){
                                   that.keepsame = false
                            }else{
                                that.para = 1
                            }
                        },{deep:true})
                    },
                    watch:{
                        'biddingset.budget'(){
                            console.log("biddingSet改变")
                                if (this.advicetarget != 0){
                                    this.biddingset.targetexposure =  Math.floor(this.biddingset.budget / (this.advicebudget / this.advicetarget))

                                    this.nearExposure =  Math.floor(this.biddingset.budget / (this.advicebudget / this.advicetarget) * this.biddingset.idleExposureRate * this.todayExposureRate)
                                    ordersum = 0
                                    for(var i = 1; i <= 48; i++){
                                        s = 'r'+i
                                        ordersum += parseInt(this.rate[s])
                                    }
                                    var blist = []
                                    var ilist = []
                                    for(var i = 1; i <= 48; i++){
                                        s = 'r'+i
                                        if(this.rate[s] / ordersum >= this.rateinput / 100){
                                           //忙时
                                            blist.push(this.rate[s])
                                        }else{
                                           //闲时
                                            ilist.push(this.rate[s])
                                        }
                                    }
                                    var busyOrderNum = 0
                                    var idleOrderNum = 0
                                    for(var i = 0; i < blist.length; i++){
                                        busyOrderNum += blist[i]
                                    }
                                    for(var i = 0; i < ilist.length; i++){
                                        idleOrderNum += ilist[i]
                                    }

                                    be = this.nearExposure * (busyOrderNum / (busyOrderNum + idleOrderNum))
                                    ie = this.nearExposure * (idleOrderNum / (busyOrderNum + idleOrderNum))
                                    be = be / this.biddingset.idleExposureRate
                                    this.nearExposure = parseInt(be + ie)

                                }
                        },
                        'biddingset.idleExposureRate'(newName,oldName){

                            if (this.advicetarget != 0){
                                this.biddingset.targetexposure =  Math.floor(this.biddingset.budget / (this.advicebudget / this.advicetarget))
                            }
                            console.log(oldName)
                            if (oldName != -999){

                                console.log("oldName:" + oldName + ",newName:" + newName)

                                if (this.advicetarget != 0){

                                    this.nearExposure =  Math.floor(this.biddingset.budget / (this.advicebudget / this.advicetarget) * this.biddingset.idleExposureRate * this.todayExposureRate)

                                    console.log("nearExposure1:" + this.nearExposure)

                                    ordersum = 0
                                    for(var i = 1; i <= 48; i++){
                                        s = 'r'+i
                                        ordersum += parseInt(this.rate[s])
                                    }
                                    var blist = []
                                    var ilist = []
                                    for(var i = 1; i <= 48; i++){
                                        s = 'r'+i
                                        if(this.rate[s] / ordersum >= this.rateinput / 100){
                                           //忙时
                                            blist.push(this.rate[s])
                                        }else{
                                           //闲时
                                            ilist.push(this.rate[s])
                                        }
                                    }
                                    var busyOrderNum = 0
                                    var idleOrderNum = 0
                                    for(var i = 0; i < blist.length; i++){
                                        busyOrderNum += blist[i]
                                    }
                                    for(var i = 0; i < ilist.length; i++){
                                        idleOrderNum += ilist[i]
                                    }

                                    be = this.nearExposure * (busyOrderNum / (busyOrderNum + idleOrderNum))
                                    ie = this.nearExposure * (idleOrderNum / (busyOrderNum + idleOrderNum))
                                    be = be / this.biddingset.idleExposureRate
                                    this.nearExposure = parseInt(be + ie)
                                    console.log("nearExposure2:" + this.nearExposure)
                                }
                            }
                        },
                        'busyp7'(newName,oldName){
                            console.log(this.busyp7)
                            console.log("busy7改变值1")
                            idleMaxPriceList = []
                            busyMaxPrice = this.busyp7
                            if(this.busyOrderRate != "" && oldName != -1){
                                console.log(newName + "改变原址" + oldName)
                                console.log("12121" + this.busyOrderRate)
                                for (var i = 0; i < this.idleOrderRateList.length; i++){
                                    idleMaxPriceList.push((busyMaxPrice / (this.busyOrderRate / this.idleOrderRateList[i])).toFixed(1))
                                }
                                this.idleMaxPriceList = idleMaxPriceList
                            }
                            console.log("busy7改变值2")
                        },
                        'idlelist'(newName,oldName){
                            if (oldName.length != 0){
                                console.log("闲时分布发生变化")
                                if(oldName.length < newName.length){
                                    this.idleMaxPriceList.push(this.idleMaxPriceList[this.idleMaxPriceList.length - 1])
                                    alert("闲时分布发生改变，需要重新获取闲时最高价")
                                }
                            }
                        },
                    },
                    methods:{
                        lockAdTime:function(){
                            var that = this
                            layui.use('layer',function (){
                                var layer = layui.layer;
                                lock = 1
                                if (that.lock){
                                    lock = 0
                                }
                                layer.open({
                                    content: '您确认要执行此操作吗?'
                                    ,btn: ['确认', '取消']
                                    ,yes: function(index, layero){
                                        layer.close(index)
                                        axios({
                                            method:'get',
                                            params:{
                                                    account : that.biddingset.shopaccount,
                                                    shopType : that.parentshoptype,
                                                    lock : lock
                                            },
                                            url: 'http://47.111.126.241:3818/api/v1/admin/localAdTime',

                                        }).then(function(response){
                                            code = response.data.code

                                            layui.use('layer', function(){
                                                var layer = layui.layer;
                                                if(code == 200){
                                                    layer.msg('设置成功');
                                                }else{
                                                    layer.msg('设置失败');
                                                }

                                            });
                                        });

                                    }
                                    ,btn2: function(index, layero){


                                    }
                                    ,cancel: function(){


                                    }
                                });
                            });
                        },
                        setbudget:function(){
                            var reNum = /^\d+$/
                            if(reNum.test(this.newbudget)){
                                var that = this
                                axios({
                                    method:'get',
                                    params:{
                                            shopId : that.parentnowid,
                                            shopType : that.parentshoptype,
                                            budget : this.newbudget,
                                    },
                                    url: 'http://47.111.126.241:3818/api/v1/admin/shop/changeBudget',

                                }).then(function(response){
                                    result = response.data
                                    if (result.data == 1){
                                        Notiflix.Notify.Success('设置成功');
                                    }else{
                                        Notiflix.Notify.Failure('设置失败');
                                    }

                                });
                            }else{
                                alert("预算金额为正整数.")
                            }
                            var that = this
                            axios({
                                method:'get',
                                params:{
                                        shopId : that.parentnowid,
                                        shopType : that.parentshoptype,
                                        budget : newbudget,
                                },
                                url: 'http://47.111.126.241:3818/api/v1/admin/shop/changeBudget',

                            }).then(function(response){
                                result = response.data
                                if (result.data == 1){
                                    Notiflix.Notify.Success('设置成功');
                                }else{
                                    Notiflix.Notify.Failure('设置失败');
                                }

                            });
                        },
                        openlowpricemode:function(){
                            lowpricemode = 1
                            if (this.lowpricemode){
                                historymode = 0
                            }
                            var that = this
                            axios({
                                method:'get',
                                params:{
                                        shopId : that.parentnowid,
                                        shopType : that.parentshoptype,
                                        status : lowpricemode,
                                },

                                url: 'http://47.111.126.241:3818/api/v1/admin/shop/setLowPrice',

                            }).then(function(response){
                                result = response.data
                                if (result.data == 1){
                                    Notiflix.Notify.Success('操作成功');
                                }else{
                                    Notiflix.Notify.Failure('操作失败');
                                }

                            });

                        },
                        historyclick:function(){
                            cancelflag = 0
                            if(this.guard){
                                var r = confirm("将关闭监控模式?您确认打开定时定价吗?")
                                if (r){
                                    this.originalOpen = 1
                                    this.guard = false
                                    var that = this
                                    axios({
                                        method:'get',
                                        params:{
                                                shopId : that.parentnowid,
                                                shopType : that.parentshoptype,
                                                status : 0
                                        },
                                        url: 'http://47.111.126.241:3818/api/v1/admin/changeGuard',

                                    }).then(function(response){
                                        result = response.data
                                        if (result.date == 1){
                                            Notiflix.Notify.Success('执行成功');
                                        }else{
                                            Notiflix.Notify.Failure('执行失败');
                                        }

                                   });
                                }else{
                                    cancelflag = 1
                                }
                            }

                            if(this.historymode){
                                historymode = 1
                                if (this.historymode){
                                    historymode = 0
                                }
                                var that = this
                                axios({
                                    method:'get',
                                    params:{
                                            shopId : that.parentnowid,
                                            shopType : that.parentshoptype,
                                            historymode : historymode,
                                            date : that.curbiddate,
                                    },
                                    url: 'http://47.111.126.241:3818/api/v1/admin/changeHistoryMode',

                                }).then(function(response){
                                    result = response.data
                                    if (result.code == 200){
                                        Notiflix.Notify.Success('操作成功');
                                    }else{
                                        Notiflix.Notify.Failure('操作失败');
                                    }
                                    that.setDateFlag = false

                               });
                            }else{
                                this.setDateFlag = true
                            }

                        },
                        cancelSetDate:function(){
                            this.setDateFlag = false
                            this.historymode = ! this.historymode
                            var that = this
                            if (this.originalOpen == 1){
                                this.guard = true
                                axios({
                                    method:'get',
                                    params:{
                                            shopId : that.parentnowid,
                                            shopType : that.parentshoptype,
                                            status : 1
                                    },
                                    url: 'http://47.111.126.241:3818/api/v1/admin/changeGuard',

                            }).then(function(response){
                                result = response.data
                                if (result.date == 1){
                                    Notiflix.Notify.Success('执行成功');
                                }else{
                                    Notiflix.Notify.Failure('执行失败');
                                }

                            });
                        }

                        },
                        openHistoryMode:function(){
                            historymode = 0
                            if (this.historymode){
                                historymode = 1
                            }
                            var that = this
                            axios({
                                method:'get',
                                params:{
                                        shopId : that.parentnowid,
                                        shopType : that.parentshoptype,
                                        historymode : historymode,
                                        date : that.curbiddate,
                                },
                                url: 'http://47.111.126.241:3818/api/v1/admin/changeHistoryMode',

                            }).then(function(response){
                                result = response.data
                                if (result.code == 200){
                                    Notiflix.Notify.Success('操作成功');
                                }else if(result.code == 404){
                                    Notiflix.Notify.Failure('无该日数据');
                                    that.historymode = !that.historymode
                                }else{
                                    Notiflix.Notify.Failure('未知错误');
                                }
                                that.setDateFlag = false

                           });

                        },
                        gethisBid:function(){
                            var res = this.curbiddate
                            flag = 0

                            var day2 = new Date();
                            day2.setTime(day2.getTime());
                            var s2 = day2.getFullYear()+"-" + (day2.getMonth()+1) + "-" + day2.getDate();
                            console.log(s2)
                            if (res == "" || res.length !=10 || res.replace(/-/g,"").length!=8){
                                alert("请输入正确的日期格式如:2019-01-01")
                            }else if(res >= s2){
                                alert("日期超前")
                            } else{
                                var that = this
                                axios({
                                    method:'get',
                                    params:{
                                            shopId : that.parentnowid,
                                            shopType : that.parentshoptype,
                                            date : that.curbiddate,
                                    },
                                    url: 'http://47.111.126.241:3818/api/v1/shop/getHisCurbid',

                                }).then(function(response){
                                    result = response.data
                                    if (result.code == 200){
                                        Notiflix.Notify.Success('获取成功');
                                    }else{
                                        Notiflix.Notify.Failure('获取失败');
                                    }
                                    res = result.data
                                    that.showCurbid = true
                                    that.curbid1 = res.slice(0,16)
                                    that.curbid2 = res.slice(16,32)
                                    that.curbid3 = res.slice(32,48)

                                });
                            }


                        },
                        openGuard:function(){
                            console.log(this.guard + "打开状态 " )
                            var res = confirm("您确定要执行此操作吗?")
                            if (res == true){
                                guard = 1
                                if (this.guard){
                                    guard = 0
                                }
                                var that = this
                                axios({
                                    method:'get',
                                    params:{
                                            shopId : that.parentnowid,
                                            shopType : that.parentshoptype,
                                            status : guard
                                    },
                                    url: 'http://47.111.126.241:3818/api/v1/admin/changeGuard',

                                }).then(function(response){
                                    result = response.data
                                    if (result.date == 1){
                                        Notiflix.Notify.Success('执行成功');
                                    }else{
                                        Notiflix.Notify.Failure('执行失败');
                                    }

                               });
                            }else{

                            }
                        },
                        changeAdStatus:function(){
                            console.log(this.biddingisopen + "打开状态 " )
                            var res = confirm("您确定要执行此操作吗?")
                            if (res == true){
                                shopStatus = 1
                                if (this.biddingisopen){
                                    shopStatus = 0
                                }
                                var that = this
                                axios({
                                    method:'get',
                                    params:{
                                            shopId : that.parentnowid,
                                            shopType : that.parentshoptype,
                                            status : shopStatus
                                    },
                                    url: 'http://47.111.126.241:3818/api/v1/admin/closeOrOpenShop',

                                }).then(function(response){
                                    result = response.data
                                    if (result.data == 1){
                                        Notiflix.Notify.Success('操作成功');
                                    }else{
                                        Notiflix.Notify.Failure('操作失败');
                                    }

                               });
                            }else{

                            }

                        },
                        getNewPara:function(){
                           var that = this


                           axios({
                            method:'get',
                            url: 'http://47.111.126.241:3818/api/v1/getSuggestParamLoad',
                            params:{
                                shopId : that.parentnowid,
                                shopType : that.parentshoptype
                            }
                            }).then(function(response){
                                result = response.data
                               console.log(result)
                                response = result.data
                               if (result.message == '成功'){
                                   Notiflix.Notify.Success('最新参数获取成功');
                                   that.havenGot = true
                                    that.gottext = "已获取."
                               }
                                that.advicemin = response.minPrice
                                that.advicemax = response.maxPrice
                                console.log(response.maxPrice)
                                that.advicebudget = response.budget
                                that.advicetarget = response.targetExposure
                                that.sevenAvgPrice = response.sevenAvgPrice
                                that.sevenAvgIncome = response.sevenAvgIncome
                                that.allCost = response.allCost
                                that.allExposure = response.allExposure
                            }).catch((res)=>{
                                console.log(res)
                            });
                       },
                        getService:function(){
                            var tomorrow = new Date();
                            tomorrow.setTime(tomorrow.getTime()+24*60*60*1000);
                            this.servicestart =  tomorrow.getFullYear()+"-" + (tomorrow.getMonth()+1) + "-" + tomorrow.getDate();

                            var endDay = new Date();
                            endDay.setTime(endDay.getTime()+24*60*60*1000*this.servicetime);
                            this.serviceend =  endDay.getFullYear()+"-" + (endDay.getMonth()+1) + "-" + endDay.getDate();

                       },
                        querytime:function(){
                            if(this.busyTimeLock){
                                alert("忙时已锁定!")
                            }else{
                                this.busylist = []
                                this.idlelist = []
                                ordersum = 0
                                for(var i = 1; i <= 48; i++){
                                    s = 'r'+i
                                    ordersum += parseInt(this.rate[s])
                                }
                                var blist = []
                                var ilist = []
                                for(var i = 1; i <= 48; i++){
                                   s = 'r'+i
                                   if(this.rate[s] / ordersum >= this.rateinput / 100){
                                       //忙时
                                        blist.push(i)
                                   }else{
                                       //闲时
                                        ilist.push(i)
                                   }
                                }

                                bstart = blist[0]
                                count = 0
                                index = 0
                                for(var i = 0; i < blist.length - 1;i++){
                                    count = count + 1
                                   if(blist[i] + 1 == blist[i+1]){
                                   }else{
                                       if (count - index == 1){
                                           this.busylist.push({s:this.getTime(bstart - 1),e:this.getTime(bstart)})
                                           index = count
                                           bstart = blist[i + 1]
                                       }
                                       else{
                                           bend = blist[i]
                                           this.busylist.push({s:this.getTime(bstart - 1),e:this.getTime(bend)})
                                            bstart = blist[i + 1]
                                       }

                                   }
                                }
                                bend = blist[blist.length - 1]
                                this.busylist.push({s:this.getTime(bstart - 1),e:this.getTime(bend)})
                                bstart = ilist[0]
                                count = 0
                                index = 0
                                for(var i = 0; i < ilist.length - 1;i++){
                                   count = count + 1
                                   if(ilist[i] + 1 == ilist[i+1]){
                                   }else{
                                       if(count - index == 1){
                                           this.idlelist.push({s:this.getTime(bstart - 1),e:this.getTime(bstart)})
                                           index = count
                                           bstart = ilist[i + 1]
                                       }else{
                                           bend = ilist[i]
                                           this.idlelist.push({s:this.getTime(bstart - 1),e:this.getTime(bend)})
                                           bstart = ilist[i + 1]
                                       }

                                   }
                               }
                               bend = ilist[ilist.length - 1]
                               this.idlelist.push({s:this.getTime(bstart - 1),e:this.getTime(bend)})
                            }
                       },
                        getTime:function(i){
                            h = ""
                            if (i%2 == 0){
                                h = Math.floor(i / 2)
                                if (h < 10){
                                    h = "0"+h + ":00"
                                }else{
                                    h = h +'' + ":00"
                                }
                            }else{
                                h = Math.floor(i / 2)
                                if (h < 10){
                                    h = "0"+h + ":30"
                                }else{
                                    h = h +'' + ":30"
                                }
                            }
                            return h
                        },
                        isNumber:function(value){
                            if (value === undefined || value === null || value === '') {
                                return false
                            }
                            if (typeof(value) === 'string') {
                                //正整数
                                var reNumber = /^\d+$/
                                //负整数
                                var reNeNumber = /^-\d+$/
                                //正实数
                                var reRealNumber1 = /^[1-9]\d*[.]\d+$/  //非零开头
                                var reRealNumber2 = /^0[.]\d+$/ //零开头
                                //负实数
                                var reNeRealNumber1 = /^-[1-9]\d*[.]\d+$/  //非零开头
                                var reNeRealNumber2 = /^-0[.]\d+$/ //零开头

                                if (reNumber.test(value)
                                || reRealNumber1.test(value) || reRealNumber2.test(value)) {
                                    return true
                                } else {
                                    return false
                                }
                            }
                            else if (typeof(value) === 'number') {
                                return true
                            }
                            else {
                                return false
                            }

                        },
                        createNewPlan:function(){
                            if (!this.isCreating){
                                if(this.allExposureRate == 0){
                                    alert("请先获取计算曝光比，计算曝光比需要依据限制百分比和基数百分比来计算");
                                }else{
                                    this.isCreating = true
                                    var that = this
                                    adTime = '['
                                    //组合成adTime字符串
                                    var i = 1
                                    while (i <=  this.timeindex){
                                        if (i == 1){
                                            adTime += "{'s':'"+this.s1h1 + ":" +this.s1m1 +"','e':'"+this.s1h2 + ":" +this.s1m2+"','p':'"+this.s1p+"'}"
                                        }else if(i == 2){
                                            adTime += ",{'s':'"+this.s2h1 + ":" +this.s2m1 +"','e':'"+this.s2h2 + ":" +this.s2m2+"','p':'"+this.s2p+"'}"
                                        }else if(i == 3){
                                           adTime += ",{'s':'"+this.s3h1 + ":" +this.s3m1 +"','e':'"+this.s3h2 + ":" +this.s3m2+"','p':'"+this.s3p+"'}"
                                        }else if(i == 4){
                                           adTime += ",{'s':'"+this.s4h1 + ":" +this.s4m1 +"','e':'"+this.s4h2 + ":" +this.s4m2+"','p':'"+this.s4p+"'}"
                                        }
                                        i  = i + 1
                                    }
                                    adTime += ']'
                                    axios({
                                        method:'get',
                                        params:{
                                            account : that.biddingset.shopaccount,
                                            shopType : that.parentshoptype,
                                            adTime : adTime,
                                            targetExposure : that.biddingset.targetexposure,
                                            allExposureRate : that.allExposureRate,
                                            idleExposureRate : that.biddingset.idleExposureRate,
                                            budget : that.biddingset.budget

                                        },
                                        url: 'http://47.111.126.241:3818/api/v1/admin/createNewPlan',
                                    }).then(function(response) {
                                        this.isCreating = false
                                        result = response.data
                                        if (result.code == 200){
                                            alert("重新生成计划成功");
                                        }else{
                                            alert("重新生成计划失败");
                                        }
                                    });
                            }
                            }else{
                                alert("正在重新生成计划,不必要重复生成");
                            }

                        },
                        save:function () {
                            flag = 1
                            immediate = 1
                            var that = this
                            layui.use('layer',function (){
                                var layer = layui.layer;
                                layer.open({
                                    content: '请选择保存方式',
                                    btnAlign: 'l'
                                    ,btn: ['立即生效','立即生效并生成计划', '明天生效', '取消']
                                    ,yes: function(index, layero){
                                        immediate = 1
                                        console.log("btn1")

                                        if (that.isNumber(that.busyp6) == true && that.isNumber(that.busyp7) == true
                                        && that.isNumber(that.idlep6) == true && that.isNumber(that.idlep7) == true
                                        ) {
                                            that.saveBiddingData(1,0)
                                        }else{
                                            layer.msg("数据格式有误，检查后请重新输入");
                                        }
                                        layer.close(index)
                                    }
                                    ,btn2: function(index, layero){

                                        immediate = 2
                                        console.log("btn2")
                                        if (that.isNumber(that.busyp6) == true && that.isNumber(that.busyp7) == true
                                        && that.isNumber(that.idlep6) == true && that.isNumber(that.idlep7) == true
                                        ) {
                                            that.saveBiddingData(1,1)
                                        }else{
                                            layer.msg("数据格式有误，检查后请重新输入");
                                        }

                                    }
                                    ,btn3: function(index, layero){

                                        immediate = 2
                                        console.log("btn3")
                                        if (that.isNumber(that.busyp6) == true && that.isNumber(that.busyp7) == true
                                        && that.isNumber(that.idlep6) == true && that.isNumber(that.idlep7) == true
                                        ) {
                                            that.saveBiddingData(0,0)
                                        }else{
                                            layer.msg("数据格式有误，检查后请重新输入");
                                        }

                                    }
                                    ,btn4: function(index, layero){
                                        immediate = 0
                                        flag = 0
                                        console.log("btn4")
                                    }
                                    ,cancel: function(){
                                        flag = 0
                                        immediate = 0
                                        console.log("取消")

                                    }
                                });
                            });


                        },
                        saveBiddingData:function(immediate,createPlan){
                            this.wait = 1
                            adTime = '['
                            //组合成adTime字符串
                            var i = 1
                            while (i <=  this.timeindex){
                                if (i == 1){
                                    adTime += "{'s':'"+this.s1h1 + ":" +this.s1m1 +"','e':'"+this.s1h2 + ":" +this.s1m2+"','p':'"+this.s1p+"'}"
                                }else if(i == 2){
                                    adTime += ",{'s':'"+this.s2h1 + ":" +this.s2m1 +"','e':'"+this.s2h2 + ":" +this.s2m2+"','p':'"+this.s2p+"'}"
                                }else if(i == 3){
                                   adTime += ",{'s':'"+this.s3h1 + ":" +this.s3m1 +"','e':'"+this.s3h2 + ":" +this.s3m2+"','p':'"+this.s3p+"'}"
                                }else if(i == 4){
                                   adTime += ",{'s':'"+this.s4h1 + ":" +this.s4m1 +"','e':'"+this.s4h2 + ":" +this.s4m2+"','p':'"+this.s4p+"'}"
                                }
                                i  = i + 1
                            }
                            adTime += ']'
                            this.biddingset.adTime = adTime
                            specialtime = '['
                            for(var i =0; i < this.busylist.length; i++){
                                specialtime += "{'s':'"+this.busylist[i].s +"','e':'" + this.busylist[i].e + "','p1':'"+this.busyp1+"','p2':'" + this.busyp2 + "','p3':'" + this.busyp3 + "','p4':'" + this.busyp6 + "','rate':'" +  this.rateinput+ "','p5':'" + this.busyp7 + "','p6':'" + this.busyp6 + "','p7':'" + this.busyp7  + "','type':1},"
                            }


                            for(var i =0; i < this.idlelist.length; i++){
                                if (this.idleMaxPriceList[i] == '' || typeof(this.idleMaxPriceList[i]) == "undefined" || this.idleMaxPriceList[i] == null){
                                    specialtime += "{'s':'"+this.idlelist[i].s +"','e':'" + this.idlelist[i].e + "','p1':'"+this.idlep1+"','p2':'" + this.idlep2 + "','p3':'" + this.idlep3 + "','p4':'" + this.idlep6 + "','rate':'" +  this.rateinput+ "','p5':'" + this.busyp7 + "','p6':'" + this.idlep6 + "','p7':'" + this.idlep7  +  "','type':0},"
                                }else{
                                    specialtime += "{'s':'"+this.idlelist[i].s +"','e':'" + this.idlelist[i].e + "','p1':'"+this.idlep1+"','p2':'" + this.idlep2 + "','p3':'" + this.idlep3 + "','p4':'" + this.idlep6 + "','rate':'" +  this.rateinput+ "','p5':'" + this.busyp7 + "','p6':'" + this.idlep6 + "','p7':'" + this.idleMaxPriceList[i]  +  "','type':0},"

                                }
                            }


                            specialtime += ']'
                            this.biddingset.specialtime = specialtime


                            idleOrderRateListStr = '['
                            for(var i =0; i < this.idleOrderRateList.length; i++){
                                idleOrderRateListStr += this.idleOrderRateList[i] + ','
                            }
                            idleOrderRateListStr += ']'


                            rate48 = []
                            for(var i = 1; i <= 48; i++){
                                s = 'r'+i
                                rate48.push(this.rate[s])
                            }
                            rate48 = '[' + rate48.join(',') +']'
                            allorderlist = '[' + this.row1orderlist + ',' + this.row2orderlist + ',' + this.row2orderlist + ']'
                            var shopisenable = 0
                            var shopisbind = 0
                            var shopisbybudget = 0
                            if (this.biddingset.isenable){
                                shopisenable = 1
                            }
                            if (this.biddingset.isbind){
                                shopisbind = 1
                            }
                            if(this.biddingset.isbybudget){
                                shopisbybudget = 1
                            }
                            historymode = 0
                            if (this.historymode){
                                historymode = 1
                            }
                            curbidlst = '[' + this.curbid1 + ',' + this.curbid2 + ',' + this.curbid3 + ']'
                            historycurbidMode = "{'status':" + historymode +",'date':'"+this.curbiddate+"','curbid':'"+curbidlst+"'}"
                            serviceTime = "{'day':"+this.servicetime+",'start':'"+this.servicestart+"','end':'"+this.serviceend+"'}"

                            busyTimeLock = 0
                            if(this.busyTimeLock){
                                busyTimeLock = 1
                            }

                            data = {}
                            if (this.parentshoptype == 1){
                                //说明是个美团店铺
                                var that = this
                                $.ajax({
                                    url: "http://47.111.126.241:3818/api/v1/shop/add",
                                    method: 'post',
                                    data: {
                                        "shopid": this.parentnowid,
                                        "mtadtime": this.biddingset.adTime,
                                        "mtaccount": this.biddingset.shopaccount,
                                        "mtname": this.biddingset.shopname,
                                        "mtbudget": this.biddingset.budget,
                                        "mtisenable": shopisenable,
                                        "mttargetexposure": this.biddingset.targetexposure,
                                        "maxprice": this.biddingset.maxprice,
                                        "minprice": this.biddingset.minprice,
                                        "reduceprice": this.biddingset.reduceprice,
                                        "increaseprice": this.biddingset.increaseprice,
                                        "os": allorderlist,
                                        "mtisbybudget": shopisbybudget,
                                        "mtisbind": shopisbind,
                                        "percentList": rate48,
                                        "shopid": this.biddingset.shopid,
                                        "specialtime":this.biddingset.specialtime,
                                        "keepSameStatus":this.keepsame,
                                        "serviceTime":serviceTime,
                                        "historycurbidMode":historycurbidMode,
                                        "immediate":immediate,
                                        "idleExposureRate" : this.biddingset.idleExposureRate,
                                        "idleOrderRateList" : idleOrderRateListStr,
                                        "busyOrderRate" : this.busyOrderRate,
                                        "daysAvgPrice" : this.daysAvgPrice,
                                        "busyTimeLock" : busyTimeLock,
                                        "controlRate" : this.controlRate,
                                        "baseRate" : this.baseRate,
                                        "createPlan" : createPlan,
                                        "nextExposureRate" : this.nextExposureRate,
                                        "allExposureRate" : this.allExposureRate,
                                    },
                                    success(data) {
                                        console.log(data.code)
                                        if (data.code == 200) {
                                            that.wait = 0

                                            layui.use('layer', function(){
                                                var layer = layui.layer;
                                                layer.msg('保存成功');
                                            });
                                        }else if(data.code == 500){
                                            that.wait = 0
                                            alert("修改失败");
                                        }
                                    }
                                });
                            } else if(this.parentshoptype == 2){
                                //说明是个饿了么店铺
                                var that = this
                                $.ajax({
                                    url: "http://47.111.126.241:3818/api/v1/shop/add",
                                    method: 'post',
                                    data: {
                                        "shopid": this.parentnowid,
                                        "eleadtime": this.biddingset.adTime,
                                        "eleaccount": this.biddingset.shopaccount,
                                        "elename": this.biddingset.shopname,
                                        "elebudget": this.biddingset.budget,
                                        "eleisenable": shopisenable,
                                        "eletargetexposure": this.biddingset.targetexposure,
                                        "maxprice": this.biddingset.maxprice,
                                        "minprice": this.biddingset.minprice,
                                        "reduceprice": this.biddingset.reduceprice,
                                        "increaseprice": this.biddingset.increaseprice,
                                        "os": allorderlist,
                                        "eleisbybudget": shopisbybudget,
                                        "eleisbind": shopisbind,
                                        "percentList": rate48,
                                        "shopid": this.biddingset.shopid,
                                        "specialtime":this.biddingset.specialtime,
                                        "keepSameStatus":this.keepsame,
                                        "serviceTime":serviceTime,
                                        "historycurbidMode":historycurbidMode,
                                        "immediate":immediate,
                                        "idleExposureRate": this.biddingset.idleExposureRate,

                                        "busyOrderRate" : this.busyOrderRate,
                                        "daysAvgPrice" : this.daysAvgPrice,
                                        "idleOrderRateList" : idleOrderRateListStr,

                                        "busyTimeLock" : busyTimeLock,
                                        "controlRate" : this.controlRate,
                                        "baseRate" : this.baseRate,
                                        "createPlan":createPlan,

                                        "nextExposureRate" : this.nextExposureRate,
                                        "allExposureRate" : this.allExposureRate,
                                    },
                                    success(data){
                                       console.log(data.code)
                                        if(data.code == 200){
                                            that.wait = 0
                                            layui.use('layer', function(){
                                                var layer = layui.layer;
                                                layer.msg('保存成功');
                                            });
                                        }else if(data.code == 500){
                                            that.wait = 0
                                            alert("修改失败");
                                        }
                                    }
                                });
                            }

                        },
                        setsame:function(){
                            if(!this.keepsame){
                                lst = "["+this.row1orderlist +","+ this.row2orderlist +","+ this.row3orderlist +"]"
                                lst = eval("("+lst+")");
                                for(var i = 1; i <= 48; i++){
                                    s = 'r'+i
                                    this.rate[s] = lst[i-1]
                                }
                            }else{
                                //使用原来值
                                if(this.rates48.length == 48){
                                    for(var i = 1; i <= 48; i++){
                                        s = 'r'+i
                                        this.rate[s] = this.rates48[i-1]
                                    }
                                }
                            }
                       },
                        acquireIdleMaxPrice:function(){
                            specialtime = '['
                            for(var i =0; i < this.busylist.length; i++){
                                specialtime += "{'s':'"+this.busylist[i].s +"','e':'" + this.busylist[i].e +  "','type':1},"
                            }
                            for(var i =0; i < this.idlelist.length; i++){
                                specialtime += "{'s':'"+this.idlelist[i].s +"','e':'" + this.idlelist[i].e  + "','type':0},"
                            }
                            specialtime += ']'
                            this.loading = true
                            var that = this
                            axios({
                                method:'get',
                                params:{
                                        shopId : that.parentnowid,
                                        shopType : that.parentshoptype,
                                        specialtime : specialtime,
                                },
                                url: 'http://47.111.126.241:3818/api/v1/admin/acquireIdleMaxPrice',

                            }).then(function(response){
                                result = response.data
                                that.loading = false
                                console.log(result)
                                busyMaxPrice = parseFloat(that.busyp7)
                                idleMinPrice = parseFloat(that.idlep6)

                                idleMaxPriceList = []

                                if (result.code == 200){
                                    if(result.data.failure == 0){
                                        idleOrderRateList = result.data.idleOrderRateList
                                        avgBusyOrderRate = result.data.avgBusyOrderRate
                                        daysAvgPrice = result.data.daysAvgPrice

                                        for (var i = 0; i < idleOrderRateList.length; i++){
                                            idleOrderRateList[i] = idleOrderRateList[i].toFixed(4)
                                            if (parseFloat(idleOrderRateList[i]) == 0){
                                                idleMaxPriceList.push(idleMinPrice + 0.2)
                                                console.log(idleMinPrice + 0.2)
                                                console.log("===0")
                                            }else if(daysAvgPrice + 0.2 < (busyMaxPrice / (avgBusyOrderRate / parseFloat(idleOrderRateList[i]))).toFixed(1)){
                                                idleMaxPriceList.push((daysAvgPrice + 0.2).toFixed(1))
                                            }else{
                                                idleMaxPriceList.push((busyMaxPrice / (avgBusyOrderRate / parseFloat(idleOrderRateList[i]))).toFixed(1))
                                            }
                                        }
                                        console.log(idleMaxPriceList)
                                        that.idleMaxPriceList = idleMaxPriceList
                                        that.idleOrderRateList = idleOrderRateList
                                        that.busyOrderRate = avgBusyOrderRate
                                        that.daysAvgPrice = result.data.daysAvgPrice
                                        Notiflix.Notify.Success('获取成功');
                                    }else{
                                         Notiflix.Notify.Failure(result.data.msg);
                                    }
                                }
                            });
                        },
                        getNewExposureRate:function(){
                            var that = this
                            adTime = '['
                            //组合成adTime字符串
                            var i = 1
                            while (i <=  this.timeindex){
                                if (i == 1){
                                    adTime += "{'s':'"+this.s1h1 + ":" +this.s1m1 +"','e':'"+this.s1h2 + ":" +this.s1m2+"','p':'"+this.s1p+"'}"
                                }else if(i == 2){
                                    adTime += ",{'s':'"+this.s2h1 + ":" +this.s2m1 +"','e':'"+this.s2h2 + ":" +this.s2m2+"','p':'"+this.s2p+"'}"
                                }else if(i == 3){
                                   adTime += ",{'s':'"+this.s3h1 + ":" +this.s3m1 +"','e':'"+this.s3h2 + ":" +this.s3m2+"','p':'"+this.s3p+"'}"
                                }else if(i == 4){
                                   adTime += ",{'s':'"+this.s4h1 + ":" +this.s4m1 +"','e':'"+this.s4h2 + ":" +this.s4m2+"','p':'"+this.s4p+"'}"
                                }
                                i  = i + 1
                            }
                            adTime += ']'


                            axios({
                                method:'get',
                                params:{
                                    account : that.biddingset.shopaccount,
                                    shopType : that.parentshoptype,
                                    adTime : adTime,
                                    targetExposure : that.biddingset.targetexposure,
                                    budget : that.biddingset.budget,
                                    controlRate : that.controlRate,
                                    baseRate : that.baseRate,
                                    shopId : that.parentnowid,

                                },
                                url: 'http://47.111.126.241:3818/api/v1/admin/getNewExposureRate',

                            }).then(function(response) {
                                result = response.data
                                if (result.code == 200){
                                    that.allExposureRate = result.data
                                }else{
                                    alert(result.message)
                                }
                            });
                        }
                    }
                },
                getshopstatuscom:{
                    template:"#getshopstatustemp",
                    props:['parenttype','parentnowid','parentshoptype','parentshopname'],
                    data(){
                        return{
                           mtshopstatus:[],
                           eleshopstatus:[],
                           mtdeletedshops : [],
                           eledeletedshops : [],
                           nowtype : 1,
                           loadflag2 : false,
                           huishouzhan : false,
                           showtitle : true,
                           showdeletedmt : false,
                           showdeletedele : false,
                       }
                    },
                    created(){
                        var that = this
                        layui.use('layer', function() {
                            var layer = layui.layer;
                            var index = layer.load(2);
                            axios({
                                method:'get',
                                url: 'http://47.111.126.241:3818/api/v1/shop/checkOut',
                            }).then(function(response){
                                result = response.data
                                layer.close(index)
                                that.mtshopstatus = result.data.mtShops
                                that.eleshopstatus = result.data.eleShops
                           });
                        });


                    },
                    methods:{
                        recover : function(shopId,shopType,index){
                            var res = confirm("店铺恢复后点击返回然后刷新即可查看")
                            var that = this
                            if(res == true){
                                axios({
                                    method:'get',
                                    params:{
                                        shopId : shopId,
                                        shopType : shopType,
                                        deleted : 0
                                    },
                                    url: 'http://47.111.126.241:3818/api/v1/shop/changeDeletedVal',
                                }).then(function(response) {
                                    result = response.data
                                    if(result.code == 200){
                                        Notiflix.Notify.Success("恢复成功");
                                        if (shopType == 1){
                                            console.log(index)
                                            that.mtdeletedshops.splice(index,index+1)

                                        }else{
                                            that.eledeletedshops.splice(index,index+1)
                                        }
                                    }else{
                                        Notiflix.Notify.Failure("操作失败");
                                    }
                                });
                            }
                        },
                        backtostatus : function(){
                            this.huishouzhan = false
                            this.nowtype = 1
                            this.showtitle = true
                        },
                        enterhuishouzhan : function(){
                            this.huishouzhan = true
                            this.nowtype = 0
                            this.showtitle = false
                            this.showdeletedmt = true
                            $('.mtclick').css("background-color","#ffc300")
                            $('.mtclick').css("color","#333333")
                            $('.eleclick').css("background-color","#f2f2f2")
                            $('.eleclick').css("color","#666666")
                            var that = this
                            axios({
                                method:'get',
                                url: 'http://47.111.126.241:3818/api/v1/shop/getDeletedShop',
                            }).then(function(response) {
                                result = response.data
                                console.log("删除的店铺")
                                console.log(result)
                                that.mtdeletedshops = result.data.mt
                                that.eledeletedshops = result.data.ele
                            })
                        },
                        deletethisshop:function(shopId,shopName,shopType,index){
                            var res = confirm("店铺删除后可从回收站恢复，您确认删除吗?")
                            var that = this
                            if(res == true){
                                axios({
                                    method:'get',
                                    params:{
                                        shopId : shopId,
                                        shopType : shopType,
                                        deleted : 1
                                    },
                                    url: 'http://47.111.126.241:3818/api/v1/shop/changeDeletedVal',
                                }).then(function(response) {
                                    result = response.data
                                    if(result.code == 200){
                                        Notiflix.Notify.Success("删除成功");
                                        if (shopType == 1){
                                            that.mtshopstatus.splice(index,1)
                                        }else{
                                            that.eleshopstatus.splice(index,1)
                                        }
                                    }else{
                                        Notiflix.Notify.Failure("操作失败");
                                    }
                                });
                            }
                        },
                        enterShop:function(shopId,shopType,shopName,status,upd){
                            console.log("准备切换组件"  + shopId + " " + shopName + " " + shopType + " "+status)
                            if(upd == 1) {
                                this.$emit("enter", shopId, shopType, shopName, true, status)
                            }else{
                                alert("请先更新")
                            }
                        },
                        getAllEleStatus:function(){
                            if (this.huishouzhan){
                                this.showdeletedele = true
                                this.showdeletedmt = false
                            }else{
                                this.nowtype = 2
                            }
                            $('.eleclick').css("background-color","#008de1")
                            $('.eleclick').css("color","white")
                            $('.mtclick').css("background-color","#f2f2f2")
                            $('.mtclick').css("color","#666666")
                        },
                        getAllMtStatus:function(){
                            if(this.huishouzhan){
                                this.showdeletedmt = true
                                this.showdeletedele = false
                            }else{
                                this.nowtype = 1
                            }
                            $('.mtclick').css("background-color","#ffc300")
                            $('.mtclick').css("color","#333333")
                            $('.eleclick').css("background-color","#f2f2f2")
                            $('.eleclick').css("color","#666666")
                        },
                        updShiptime:function(shopId,shopType,index){
                            console.log(shopId + "  " + shopType + " " + index)

                            var that = this
                               axios({
                                   method:'get',
                                   params:{
                                        shopId : shopId,
                                        shopType : shopType
                                    },
                                   url: 'http://47.111.126.241:3818/api/v1/shop/updShopInfo',
                               }).then(function(response){
                                   result = response.data.data
                                   console.log(result)
                                   response = result.date

                                   Notiflix.Notify.Success('更新成功');
                                   if(shopType == 1){
                                       that.mtshopstatus[index].shipTime = response.shipTime
                                       that.mtshopstatus[index].status = response.shopStatus
                                       that.mtshopstatus[index].upd = 1
                                   }else{
                                       that.eleshopstatus[index].shipTime = response.shipTime
                                       that.eleshopstatus[index].status = response.shopStatus
                                       that.eleshopstatus[index].upd = 1
                                   }
                               });

                        }
                    },
                },
                datapreparedcom:{
                    template : "#datapreparedtemp",
                    props:['parentnowid','parentshoptype','parentshopname'],
                    data(){
                        return {
                            checkResult : [],
                            loading : false,
                        }
                    },
                    created(){
                        var that = this
                        this.loading = true
                        axios({
                            method:'get',
                            url: 'http://47.111.126.241:3818/api/v1/admin/reportCheck',

                        }).then(function(response){
                            response = response.data
                            that.loading = false
                            that.checkResult = response.data
                            console.log(that.checkResult)
                        });
                    },
                    methods:{
                        getReportData:function(shopId, index){
                            this.loading = true
                            var that = this
                            axios({
                                method:'get',
                                url: 'http://47.111.126.241:3818/api/v1/admin/getReportData',
                                params:{
                                    shopId : shopId,
                                    shopType : 1,
                                },

                            }).then(function(response){
                                response = response.data
                                if (response.code == 200){
                                    that.checkResult[index].hasReportData = 1
                                    that.loading = false
                                }else{

                                }


                            });

                        }
                    },
                },
                exceptioncom:{
                    template:"#exceptiontemp",
                    props:['parentnowid','parentshoptype','parentshopname'],
                    data(){
                        return {
                            hideExceptionBtn : true,
                            loadflag : false,
                            exceptionList : [],
                            exceptionClick : false,
                        }
                    },
                    created(){
                        this.loadflag = false
                    },
                    methods:{
                        exceptionActived:function(){

                            if(!$('#btnActivation').hasClass(('btn--activated'))){
                                $('#btnActivation').removeClass('btn--activate');
                                $('#btnActivation').addClass('btn--waiting');

                                var that = this
                                axios({
                                    method:'get',
                                    url: 'http://47.111.126.241:3818/api/v1/admin/shop/checkBug',
                                }).then(function(response){
                                    that.exceptionClick = true
                                    result = response.data
                                    response = result.data
                                    console.log(response)
                                    that.exceptionList = response
                                    $('#btnActivation').removeClass('btn--waiting');
		                            $('#btnActivation').addClass('btn--activated');
                                });
                            }
                        },
                        exceptionHover:function(){
                            if($('#btnActivation').hasClass(('btn--activated'))){
                                $('#btnActivation').removeClass('btn--activated');
                                $('#btnActivation').addClass('btn--activate');
                            }
                        },

                    }
                }
            }

        });


    </script>
</html>